{
 "cells": [
  {
   "cell_type": "markdown",
   "id": "8068f820",
   "metadata": {},
   "source": [
    "# HugModel Example"
   ]
  },
  {
   "cell_type": "markdown",
   "id": "b84d3f83",
   "metadata": {},
   "source": [
    "You can install torchkeras using pip:\n",
    "`pip install torchkeras`\n",
    "\n",
    "Here is the mnist example using torchkeras.HugModel. \n"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 1,
   "id": "3e915b9b",
   "metadata": {},
   "outputs": [],
   "source": [
    "import sys \n",
    "sys.path.append(\"..\")\n"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 2,
   "id": "a1920bc7",
   "metadata": {},
   "outputs": [],
   "source": [
    "import numpy as np \n",
    "import pandas as pd \n",
    "from matplotlib import pyplot as plt\n",
    "import torch\n",
    "from torch import nn\n",
    "import torch.nn.functional as F\n",
    "from torch.utils.data import Dataset,DataLoader\n"
   ]
  },
  {
   "cell_type": "markdown",
   "id": "e73ca619",
   "metadata": {},
   "source": [
    "### 1, prepare data "
   ]
  },
  {
   "cell_type": "code",
   "execution_count": null,
   "id": "bda3c5b9-1211-4bde-bf80-f2c96785d9c8",
   "metadata": {},
   "outputs": [],
   "source": []
  },
  {
   "cell_type": "code",
   "execution_count": 3,
   "id": "25ab4939",
   "metadata": {},
   "outputs": [],
   "source": [
    "import torchvision \n",
    "from torchvision import transforms\n",
    "\n",
    "transform = transforms.Compose([transforms.ToTensor()])\n",
    "ds_train = torchvision.datasets.MNIST(root=\"mnist/\",train=True,download=True,transform=transform)\n",
    "ds_train = torch.utils.data.Subset(ds_train,indices=range(0,len(ds_train),30))\n",
    "\n",
    "ds_val = torchvision.datasets.MNIST(root=\"mnist/\",train=False,download=True,transform=transform)\n",
    "ds_val = torch.utils.data.Subset(ds_val,indices=range(0,len(ds_val),30))\n",
    "\n",
    "dl_train =  torch.utils.data.DataLoader(ds_train, batch_size=128, shuffle=True)\n",
    "dl_val =  torch.utils.data.DataLoader(ds_val, batch_size=128, shuffle=False)\n",
    "\n"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": null,
   "id": "91ec88bd-614b-481e-9c38-2a09a977b82e",
   "metadata": {},
   "outputs": [],
   "source": []
  },
  {
   "cell_type": "code",
   "execution_count": 4,
   "id": "85a45abd",
   "metadata": {},
   "outputs": [
    {
     "name": "stdout",
     "output_type": "stream",
     "text": [
      "torch.Size([128, 1, 28, 28])\n",
      "torch.Size([128])\n"
     ]
    }
   ],
   "source": [
    "for features,labels in dl_train:\n",
    "    break\n",
    "print(features.shape)\n",
    "print(labels.shape)\n"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 5,
   "id": "c484c0b4",
   "metadata": {},
   "outputs": [
    {
     "data": {
      "image/svg+xml": [
       "<?xml version=\"1.0\" encoding=\"utf-8\" standalone=\"no\"?>\n",
       "<!DOCTYPE svg PUBLIC \"-//W3C//DTD SVG 1.1//EN\"\n",
       "  \"http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd\">\n",
       "<svg xmlns:xlink=\"http://www.w3.org/1999/xlink\" width=\"463.452941pt\" height=\"476.538125pt\" viewBox=\"0 0 463.452941 476.538125\" xmlns=\"http://www.w3.org/2000/svg\" version=\"1.1\">\n",
       " <metadata>\n",
       "  <rdf:RDF xmlns:dc=\"http://purl.org/dc/elements/1.1/\" xmlns:cc=\"http://creativecommons.org/ns#\" xmlns:rdf=\"http://www.w3.org/1999/02/22-rdf-syntax-ns#\">\n",
       "   <cc:Work>\n",
       "    <dc:type rdf:resource=\"http://purl.org/dc/dcmitype/StillImage\"/>\n",
       "    <dc:date>2023-07-22T07:32:21.646776</dc:date>\n",
       "    <dc:format>image/svg+xml</dc:format>\n",
       "    <dc:creator>\n",
       "     <cc:Agent>\n",
       "      <dc:title>Matplotlib v3.6.2, https://matplotlib.org/</dc:title>\n",
       "     </cc:Agent>\n",
       "    </dc:creator>\n",
       "   </cc:Work>\n",
       "  </rdf:RDF>\n",
       " </metadata>\n",
       " <defs>\n",
       "  <style type=\"text/css\">*{stroke-linejoin: round; stroke-linecap: butt}</style>\n",
       " </defs>\n",
       " <g id=\"figure_1\">\n",
       "  <g id=\"patch_1\">\n",
       "   <path d=\"M 0 476.538125 \n",
       "L 463.452941 476.538125 \n",
       "L 463.452941 0 \n",
       "L 0 0 \n",
       "z\n",
       "\" style=\"fill: #ffffff\"/>\n",
       "  </g>\n",
       "  <g id=\"axes_1\">\n",
       "   <g id=\"patch_2\">\n",
       "    <path d=\"M 10.7 152.765184 \n",
       "L 141.147059 152.765184 \n",
       "L 141.147059 22.318125 \n",
       "L 10.7 22.318125 \n",
       "z\n",
       "\" style=\"fill: #ffffff\"/>\n",
       "   </g>\n",
       "   <g clip-path=\"url(#pc8e9eb6630)\">\n",
       "    <image xlink:href=\"data:image/png;base64,\n",
       "iVBORw0KGgoAAAANSUhEUgAAALYAAAC2CAYAAAB08HcEAAAF7UlEQVR4nO3dX2iVdRzH8edxR52r5VrLnIRzbbWZ1gaOmjlWkJkXIkjG2kXBoqLERrXoQgIrihz9AYlaIIQGA01DEPpzZ0PIbMMotD+jrUXTdWQbW6bDubPTVXff7+Zzdnbm+fh+XX5//HYe8M3v4sc5j+H6cGsyAMTMm+sHAGYDYUMSYUMSYUMSYUMSYUMSYUMSYUMSYUMSYUMSYUMSYUMSYUMSYUMSYUMSYUMSYUMSYUMSYUNSLFMf1N12jz3f3JbWz/lwpMyc7+7Y4O4JE6E5r3zzD3dPIn4u2oMhozixIYmwIYmwIYmwIYmwISnM1Jugxh+usecvDrt7dpR/ac43LLqQlmeaTjwx5q7VH2kx55Wv/uruSYyMzviZcGU4sSGJsCGJsCGJsCGJsCGJsCEpY9d9qYgVLzXnw59c5+55rrTDnDfmx9PyTNPZfqbOXTvZVm3Oiw6dcvdMnj8/00e6JnFiQxJhQxJhQxJhQxJhQ9JVfSuSitiK5eZ8dE2xu6fhja/N+bMFvWl5pum0DNS6a8c/sr88Vrj3e/8PTiZm+khZjxMbkggbkggbkggbkggbkggbkuSu+1IRKy0x5z1Ny9w9rzXsN+ePX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ugOe+fsK/0giAIdsUfMuc/v323uyfv8Al3LZ04sSGJsCGJsCGJsCGJsCFJ7lYkU8KY/f2xnJv9n3ml4reXV5jzRN6ku6ek7Jw5z9sWunv+ft/+ktjJGv+WZzBh3wzde7DF3VP+UipfBIuOExuSCBuSCBuSCBuSCBuSCBuSuO6DJE5sSCJsSCJsSCJsSCJsSCJsSCJsSCJsSCJsSCJsSCJsSCJsSCJsSCJsSCJsSCJsSCJsSCJsSCJsSCJsSCJsSCJsSCJsSCJsSCJsSCJsSCJsSCJsSCJsSCJsSCJsSPoPboXuOT7HWnMAAAAASUVORK5CYII=\" id=\"image7aa6c1b2c0\" transform=\"scale(1 -1) translate(0 -131.04)\" x=\"10.7\" y=\"-21.725184\" width=\"131.04\" height=\"131.04\"/>\n",
       "   </g>\n",
       "   <g id=\"matplotlib.axis_1\"/>\n",
       "   <g id=\"matplotlib.axis_2\"/>\n",
       "   <g id=\"patch_3\">\n",
       "    <path d=\"M 10.7 152.765184 \n",
       "L 10.7 22.318125 \n",
       "\" style=\"fill: none; stroke: #000000; stroke-width: 0.8; stroke-linejoin: miter; stroke-linecap: square\"/>\n",
       "   </g>\n",
       "   <g id=\"patch_4\">\n",
       "    <path d=\"M 141.147059 152.765184 \n",
       "L 141.147059 22.318125 \n",
       "\" style=\"fill: none; stroke: #000000; stroke-width: 0.8; stroke-linejoin: miter; stroke-linecap: square\"/>\n",
       "   </g>\n",
       "   <g id=\"patch_5\">\n",
       "    <path d=\"M 10.7 152.765184 \n",
       "L 141.147059 152.765184 \n",
       "\" style=\"fill: none; stroke: #000000; stroke-width: 0.8; stroke-linejoin: miter; stroke-linecap: square\"/>\n",
       "   </g>\n",
       "   <g id=\"patch_6\">\n",
       "    <path d=\"M 10.7 22.318125 \n",
       "L 141.147059 22.318125 \n",
       "\" style=\"fill: none; stroke: #000000; stroke-width: 0.8; stroke-linejoin: miter; stroke-linecap: square\"/>\n",
       "   </g>\n",
       "   <g id=\"text_1\">\n",
       "    <!-- label = 5 -->\n",
       "    <g transform=\"translate(48.752904 16.318125) scale(0.12 -0.12)\">\n",
       "     <defs>\n",
       "      <path id=\"DejaVuSans-6c\" d=\"M 603 4863 \n",
       "L 1178 4863 \n",
       "L 1178 0 \n",
       "L 603 0 \n",
       "L 603 4863 \n",
       "z\n",
       "\" transform=\"scale(0.015625)\"/>\n",
       "      <path id=\"DejaVuSans-61\" d=\"M 2194 1759 \n",
       "Q 1497 1759 1228 1600 \n",
       "Q 959 1441 959 1056 \n",
       "Q 959 750 1161 570 \n",
       "Q 1363 391 1709 391 \n",
       "Q 2188 391 2477 730 \n",
       "Q 2766 1069 2766 1631 \n",
       "L 2766 1759 \n",
       "L 2194 1759 \n",
       "z\n",
       "M 3341 1997 \n",
       "L 3341 0 \n",
       "L 2766 0 \n",
       "L 2766 531 \n",
       "Q 2569 213 2275 61 \n",
       "Q 1981 -91 1556 -91 \n",
       "Q 1019 -91 701 211 \n",
       "Q 384 513 384 1019 \n",
       "Q 384 1609 779 1909 \n",
       "Q 1175 2209 1959 2209 \n",
       "L 2766 2209 \n",
       "L 2766 2266 \n",
       "Q 2766 2663 2505 2880 \n",
       "Q 2244 3097 1772 3097 \n",
       "Q 1472 3097 1187 3025 \n",
       "Q 903 2953 641 2809 \n",
       "L 641 3341 \n",
       "Q 956 3463 1253 3523 \n",
       "Q 1550 3584 1831 3584 \n",
       "Q 2591 3584 2966 3190 \n",
       "Q 3341 2797 3341 1997 \n",
       "z\n",
       "\" transform=\"scale(0.015625)\"/>\n",
       "      <path id=\"DejaVuSans-62\" d=\"M 3116 1747 \n",
       "Q 3116 2381 2855 2742 \n",
       "Q 2594 3103 2138 3103 \n",
       "Q 1681 3103 1420 2742 \n",
       "Q 1159 2381 1159 1747 \n",
       "Q 1159 1113 1420 752 \n",
       "Q 1681 391 2138 391 \n",
       "Q 2594 391 2855 752 \n",
       "Q 3116 1113 3116 1747 \n",
       "z\n",
       "M 1159 2969 \n",
       "Q 1341 3281 1617 3432 \n",
       "Q 1894 3584 2278 3584 \n",
       "Q 2916 3584 3314 3078 \n",
       "Q 3713 2572 3713 1747 \n",
       "Q 3713 922 3314 415 \n",
       "Q 2916 -91 2278 -91 \n",
       "Q 1894 -91 1617 61 \n",
       "Q 1341 213 1159 525 \n",
       "L 1159 0 \n",
       "L 581 0 \n",
       "L 581 4863 \n",
       "L 1159 4863 \n",
       "L 1159 2969 \n",
       "z\n",
       "\" transform=\"scale(0.015625)\"/>\n",
       "      <path id=\"DejaVuSans-65\" d=\"M 3597 1894 \n",
       "L 3597 1613 \n",
       "L 953 1613 \n",
       "Q 991 1019 1311 708 \n",
       "Q 1631 397 2203 397 \n",
       "Q 2534 397 2845 478 \n",
       "Q 3156 559 3463 722 \n",
       "L 3463 178 \n",
       "Q 3153 47 2828 -22 \n",
       "Q 2503 -91 2169 -91 \n",
       "Q 1331 -91 842 396 \n",
       "Q 353 884 353 1716 \n",
       "Q 353 2575 817 3079 \n",
       "Q 1281 3584 2069 3584 \n",
       "Q 2775 3584 3186 3129 \n",
       "Q 3597 2675 3597 1894 \n",
       "z\n",
       "M 3022 2063 \n",
       "Q 3016 2534 2758 2815 \n",
       "Q 2500 3097 2075 3097 \n",
       "Q 1594 3097 1305 2825 \n",
       "Q 1016 2553 972 2059 \n",
       "L 3022 2063 \n",
       "z\n",
       "\" transform=\"scale(0.015625)\"/>\n",
       "      <path id=\"DejaVuSans-20\" transform=\"scale(0.015625)\"/>\n",
       "      <path id=\"DejaVuSans-3d\" d=\"M 678 2906 \n",
       "L 4684 2906 \n",
       "L 4684 2381 \n",
       "L 678 2381 \n",
       "L 678 2906 \n",
       "z\n",
       "M 678 1631 \n",
       "L 4684 1631 \n",
       "L 4684 1100 \n",
       "L 678 1100 \n",
       "L 678 1631 \n",
       "z\n",
       "\" transform=\"scale(0.015625)\"/>\n",
       "      <path id=\"DejaVuSans-35\" d=\"M 691 4666 \n",
       "L 3169 4666 \n",
       "L 3169 4134 \n",
       "L 1269 4134 \n",
       "L 1269 2991 \n",
       "Q 1406 3038 1543 3061 \n",
       "Q 1681 3084 1819 3084 \n",
       "Q 2600 3084 3056 2656 \n",
       "Q 3513 2228 3513 1497 \n",
       "Q 3513 744 3044 326 \n",
       "Q 2575 -91 1722 -91 \n",
       "Q 1428 -91 1123 -41 \n",
       "Q 819 9 494 109 \n",
       "L 494 744 \n",
       "Q 775 591 1075 516 \n",
       "Q 1375 441 1709 441 \n",
       "Q 2250 441 2565 725 \n",
       "Q 2881 1009 2881 1497 \n",
       "Q 2881 1984 2565 2268 \n",
       "Q 2250 2553 1709 2553 \n",
       "Q 1456 2553 1204 2497 \n",
       "Q 953 2441 691 2322 \n",
       "L 691 4666 \n",
       "z\n",
       "\" transform=\"scale(0.015625)\"/>\n",
       "     </defs>\n",
       "     <use xlink:href=\"#DejaVuSans-6c\"/>\n",
       "     <use xlink:href=\"#DejaVuSans-61\" x=\"27.783203\"/>\n",
       "     <use xlink:href=\"#DejaVuSans-62\" x=\"89.0625\"/>\n",
       "     <use xlink:href=\"#DejaVuSans-65\" x=\"152.539062\"/>\n",
       "     <use xlink:href=\"#DejaVuSans-6c\" x=\"214.0625\"/>\n",
       "     <use xlink:href=\"#DejaVuSans-20\" x=\"241.845703\"/>\n",
       "     <use xlink:href=\"#DejaVuSans-3d\" x=\"273.632812\"/>\n",
       "     <use xlink:href=\"#DejaVuSans-20\" x=\"357.421875\"/>\n",
       "     <use xlink:href=\"#DejaVuSans-35\" x=\"389.208984\"/>\n",
       "    </g>\n",
       "   </g>\n",
       "  </g>\n",
       "  <g id=\"axes_2\">\n",
       "   <g id=\"patch_7\">\n",
       "    <path d=\"M 168.252941 152.765184 \n",
       "L 298.7 152.765184 \n",
       "L 298.7 22.318125 \n",
       "L 168.252941 22.318125 \n",
       "z\n",
       "\" style=\"fill: #ffffff\"/>\n",
       "   </g>\n",
       "   <g clip-path=\"url(#p6a49a0c006)\">\n",
       "    <image xlink:href=\"data:image/png;base64,\n",
       "iVBORw0KGgoAAAANSUhEUgAAALYAAAC2CA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xyWPf0Pm/OBv+clvlbfqaXu2srDl815fga/+ZgKJzYkETYkETYkETYkETYkETYk8SGoEEJmnv3qbGj7He6ejv1vm/N12bj/nU+0PWPOU12not5HDSc2JBE2JBE2JBE2JBE2JPFWZJrSLavM+ep3f3L3HLjxZOL7PNrdZs7rn/rT3ZP/YzjxfdRwYkMSYUMSYUMSYUMSYUMSYUNS1Nd9T/ZcdNeG83PM+QdvPebuWdTZVfQzlVtm5XJ37ddXsub85H1HE99nw8v73LXGI9X3/xYbJzYkETYkETYkETYkETYkRf0lqPYG/63IZMH+02l7X+px93zygvMLTVM42L3VnI8N1bl76ntnJb7PdIxdjvdn4kadP3kXQgiN0e5SvTixIYmwIYmwIYmwIYmwIYmwISnqh6Au7b3fXRtZP27O2+8+5u55sdH//uD14ujIEnP+0eOt7p7cuf5SPU7V4MSGJMKGJMKGJMKGJMKGpIr/ElRmfoO7lppjf53s/I5b3T0jd8b7oNFMsKpj1Jz/2326zE9SXTixIYmwIYmwIYmwIYmwIYmwIanir/uAUuDEhiTChiTChiTChiTChiTChiTChiTChiTChiTChiTChiTChiTChiTChiTChiTChiTChiTChiTChiTChiTChiTChiTChiTChiTChiTChiTChiTChiTChiTChiTChiTChiTChiTChiTChiTChiTChiTChiTChiTChiTChiTChiTChiTChqT/ALTWw0W0G4QdAAAAAElFTkSuQmCC\" id=\"imagedfe38fa89d\" transform=\"scale(1 -1) translate(0 -131.04)\" x=\"168.252941\" y=\"-21.725184\" width=\"131.04\" height=\"131.04\"/>\n",
       "   </g>\n",
       "   <g id=\"matplotlib.axis_3\"/>\n",
       "   <g id=\"matplotlib.axis_4\"/>\n",
       "   <g id=\"patch_8\">\n",
       "    <path d=\"M 168.252941 152.765184 \n",
       "L 168.252941 22.318125 \n",
       "\" style=\"fill: none; stroke: #000000; stroke-width: 0.8; stroke-linejoin: miter; stroke-linecap: square\"/>\n",
       "   </g>\n",
       "   <g id=\"patch_9\">\n",
       "    <path d=\"M 298.7 152.765184 \n",
       "L 298.7 22.318125 \n",
       "\" style=\"fill: none; stroke: #000000; stroke-width: 0.8; stroke-linejoin: miter; stroke-linecap: square\"/>\n",
       "   </g>\n",
       "   <g id=\"patch_10\">\n",
       "    <path d=\"M 168.252941 152.765184 \n",
       "L 298.7 152.765184 \n",
       "\" style=\"fill: none; stroke: #000000; stroke-width: 0.8; stroke-linejoin: miter; stroke-linecap: square\"/>\n",
       "   </g>\n",
       "   <g id=\"patch_11\">\n",
       "    <path d=\"M 168.252941 22.318125 \n",
       "L 298.7 22.318125 \n",
       "\" style=\"fill: none; stroke: #000000; stroke-width: 0.8; stroke-linejoin: miter; stroke-linecap: square\"/>\n",
       "   </g>\n",
       "   <g id=\"text_2\">\n",
       "    <!-- label = 3 -->\n",
       "    <g transform=\"translate(206.305846 16.318125) scale(0.12 -0.12)\">\n",
       "     <defs>\n",
       "      <path id=\"DejaVuSans-33\" d=\"M 2597 2516 \n",
       "Q 3050 2419 3304 2112 \n",
       "Q 3559 1806 3559 1356 \n",
       "Q 3559 666 3084 287 \n",
       "Q 2609 -91 1734 -91 \n",
       "Q 1441 -91 1130 -33 \n",
       "Q 819 25 488 141 \n",
       "L 488 750 \n",
       "Q 750 597 1062 519 \n",
       "Q 1375 441 1716 441 \n",
       "Q 2309 441 2620 675 \n",
       "Q 2931 909 2931 1356 \n",
       "Q 2931 1769 2642 2001 \n",
       "Q 2353 2234 1838 2234 \n",
       "L 1294 2234 \n",
       "L 1294 2753 \n",
       "L 1863 2753 \n",
       "Q 2328 2753 2575 2939 \n",
       "Q 2822 3125 2822 3475 \n",
       "Q 2822 3834 2567 4026 \n",
       "Q 2313 4219 1838 4219 \n",
       "Q 1578 4219 1281 4162 \n",
       "Q 984 4106 628 3988 \n",
       "L 628 4550 \n",
       "Q 988 4650 1302 4700 \n",
       "Q 1616 4750 1894 4750 \n",
       "Q 2613 4750 3031 4423 \n",
       "Q 3450 4097 3450 3541 \n",
       "Q 3450 3153 3228 2886 \n",
       "Q 3006 2619 2597 2516 \n",
       "z\n",
       "\" transform=\"scale(0.015625)\"/>\n",
       "     </defs>\n",
       "     <use xlink:href=\"#DejaVuSans-6c\"/>\n",
       "     <use xlink:href=\"#DejaVuSans-61\" x=\"27.783203\"/>\n",
       "     <use xlink:href=\"#DejaVuSans-62\" x=\"89.0625\"/>\n",
       "     <use xlink:href=\"#DejaVuSans-65\" x=\"152.539062\"/>\n",
       "     <use xlink:href=\"#DejaVuSans-6c\" x=\"214.0625\"/>\n",
       "     <use xlink:href=\"#DejaVuSans-20\" x=\"241.845703\"/>\n",
       "     <use xlink:href=\"#DejaVuSans-3d\" x=\"273.632812\"/>\n",
       "     <use xlink:href=\"#DejaVuSans-20\" x=\"357.421875\"/>\n",
       "     <use xlink:href=\"#DejaVuSans-33\" x=\"389.208984\"/>\n",
       "    </g>\n",
       "   </g>\n",
       "  </g>\n",
       "  <g id=\"axes_3\">\n",
       "   <g id=\"patch_12\">\n",
       "    <path d=\"M 325.805882 152.765184 \n",
       "L 456.252941 152.765184 \n",
       "L 456.252941 22.318125 \n",
       "L 325.805882 22.318125 \n",
       "z\n",
       "\" style=\"fill: #ffffff\"/>\n",
       "   </g>\n",
       "   <g clip-path=\"url(#p4f6b4d646a)\">\n",
       "    <image xlink:href=\"data:image/png;base64,\n",
       "iVBORw0KGgoAAAANSUhEUgAAALYAAAC2CAYAAAB08HcEAAAFy0lEQVR4nO3dX2iVdRzH8d/ZP7OcrTHWMHJu9gejYkyIuVglLYj+XASLESG54R+sNEGvvOiuRf8YRUWECa2LErKbIhIXU2NqI2Mx8s9Swta6KCbKwLO2nXO68ka+3wNPO+d5jp+9X5e/h9/Zb+PtD/zxPM9Jdaa6cgEQU5b0AoBiIGxIImxIImxIImxIImxIImxIImxIImxIImxIImxIImxIImxIImxIImxIImxIImxIImxIImxIImxIImxIImxIImxIImxIImxIImxIImxIImxIImxIImxIImxIImxIqkh6ASgNFU2N5niu0k8kM36+WMtZMHZsSCJsSCJsSCJsSCJsSOJUBCGEEGb3Zs3x1lr/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ETYkETYkJT4cV8+qzZNmON7hvwbp/rq7ePD0fZ97pw1A/Zbqu7c+Iu/uGxcX7yXrM+mG9xrtw2cMcdL4S/Djg1JhA1JhA1JhA1JhA1JJX0qkrl02Rw/+mabO2e0b8Qcz/c42W+P7jXHn6pqd+dkZ0rh//62i73rzPHOG4fdOeNzKXP8ndOd7pwVU6eiLSxG7NiQRNiQRNiQRNiQRNiQRNiQVNLHfZ7ln59wr23P7TDHP3z9XXfOcPoOczyXS/QlWf9bxv6WulCZ8vexnlMbzPEVz5TukV4+7NiQRNiQRNiQRNiQRNiQlPj7seMy17nWvVY5eDLGlSRnarN9c1QIIdz6nf0Y3vzEn8VaTlGxY0MSYUMSYUMSYUMSYUMSYUPSojnuw+LCjg1JhA1JhA1JhA1JhA1JhA1JhA1JhA1JhA1JhA1JhA1JhA1JhA1JhA1JhA1JhA1JhA1JhA1JhA1JhA1JhA1JhA1JhA1JhA1JhA1JhA1JhA1JhA1JhA1JhA1JhA1J/wFh2+ZSLqDz0QAAAABJRU5ErkJggg==\" id=\"image99287b8924\" transform=\"scale(1 -1) translate(0 -131.04)\" x=\"325.805882\" y=\"-21.725184\" width=\"131.04\" height=\"131.04\"/>\n",
       "   </g>\n",
       "   <g id=\"matplotlib.axis_5\"/>\n",
       "   <g id=\"matplotlib.axis_6\"/>\n",
       "   <g id=\"patch_13\">\n",
       "    <path d=\"M 325.805882 152.765184 \n",
       "L 325.805882 22.318125 \n",
       "\" style=\"fill: none; stroke: #000000; stroke-width: 0.8; stroke-linejoin: miter; stroke-linecap: square\"/>\n",
       "   </g>\n",
       "   <g id=\"patch_14\">\n",
       "    <path d=\"M 456.252941 152.765184 \n",
       "L 456.252941 22.318125 \n",
       "\" style=\"fill: none; stroke: #000000; stroke-width: 0.8; stroke-linejoin: miter; stroke-linecap: square\"/>\n",
       "   </g>\n",
       "   <g id=\"patch_15\">\n",
       "    <path d=\"M 325.805882 152.765184 \n",
       "L 456.252941 152.765184 \n",
       "\" style=\"fill: none; stroke: #000000; stroke-width: 0.8; stroke-linejoin: miter; stroke-linecap: square\"/>\n",
       "   </g>\n",
       "   <g id=\"patch_16\">\n",
       "    <path d=\"M 325.805882 22.318125 \n",
       "L 456.252941 22.318125 \n",
       "\" style=\"fill: none; stroke: #000000; stroke-width: 0.8; stroke-linejoin: miter; stroke-linecap: square\"/>\n",
       "   </g>\n",
       "   <g id=\"text_3\">\n",
       "    <!-- label = 4 -->\n",
       "    <g transform=\"translate(363.858787 16.318125) scale(0.12 -0.12)\">\n",
       "     <defs>\n",
       "      <path id=\"DejaVuSans-34\" d=\"M 2419 4116 \n",
       "L 825 1625 \n",
       "L 2419 1625 \n",
       "L 2419 4116 \n",
       "z\n",
       "M 2253 4666 \n",
       "L 3047 4666 \n",
       "L 3047 1625 \n",
       "L 3713 1625 \n",
       "L 3713 1100 \n",
       "L 3047 1100 \n",
       "L 3047 0 \n",
       "L 2419 0 \n",
       "L 2419 1100 \n",
       "L 313 1100 \n",
       "L 313 1709 \n",
       "L 2253 4666 \n",
       "z\n",
       "\" transform=\"scale(0.015625)\"/>\n",
       "     </defs>\n",
       "     <use xlink:href=\"#DejaVuSans-6c\"/>\n",
       "     <use xlink:href=\"#DejaVuSans-61\" x=\"27.783203\"/>\n",
       "     <use xlink:href=\"#DejaVuSans-62\" x=\"89.0625\"/>\n",
       "     <use xlink:href=\"#DejaVuSans-65\" x=\"152.539062\"/>\n",
       "     <use xlink:href=\"#DejaVuSans-6c\" x=\"214.0625\"/>\n",
       "     <use xlink:href=\"#DejaVuSans-20\" x=\"241.845703\"/>\n",
       "     <use xlink:href=\"#DejaVuSans-3d\" x=\"273.632812\"/>\n",
       "     <use xlink:href=\"#DejaVuSans-20\" x=\"357.421875\"/>\n",
       "     <use xlink:href=\"#DejaVuSans-34\" x=\"389.208984\"/>\n",
       "    </g>\n",
       "   </g>\n",
       "  </g>\n",
       "  <g id=\"axes_4\">\n",
       "   <g id=\"patch_17\">\n",
       "    <path d=\"M 10.7 309.301654 \n",
       "L 141.147059 309.301654 \n",
       "L 141.147059 178.854596 \n",
       "L 10.7 178.854596 \n",
       "z\n",
       "\" style=\"fill: #ffffff\"/>\n",
       "   </g>\n",
       "   <g clip-path=\"url(#p857d5961c7)\">\n",
       "    <image xlink:href=\"data:image/png;base64,\n",
       "iVBORw0KGgoAAAANSUhEUgAAALYAAAC2CAYAAAB08HcEAAAGgElEQVR4nO3de2iVdRzH8efs5jymSymXl+lUlo5pTcRLdtFsSVp/CE4URFOrZc0WSkZIf0RUCkVEmRHdCCNSishEU4PQQk1J12Waq8zmXBfznnPOc+m/IPp+J886znM+e7/+/D78dh7szQ/68ZznRCoilckAEJN1uW8AuBQIG5IIG5IIG5IIG5IIG5IIG5IIG5IIG5IIG5IIG5IIG5IIG5IIG5IIG5IIG5IIG5IIG5IIG5IIG5IIG5IIG5IIG5IIG5IIG5IIG5IIG5IIG5IIG5IIG5IIG5IIG5IIG5IIG5IIG5IIG5IIG5IIG5JyLvcNpIOs7t3N+aHFI9w1AyY0mPMNw9aF/vxzyVb32tRFNeY8uvFrd03y/PnQ96CGHRuSCBuSCBuSCBuSCBuSCBuSIhWRyuTlvolUinTpYs5/eWyUu2bl3FfN+cT8Cym5p4vJjvj7SzyZMOc31M5011xdddacx440hbuxDMaODUmEDUmEDUmEDUmEDUlypyJnp48151tffKVDPr/+Qot7bXfLAHOen+WfvkzvdiL0PXzbav+9WbvvddcUL7dPX5J760J/fjpgx4YkwoYkwoYkwoYkwoYkwoakjDzuy4pG3WvdNtnX1gzefKlu518mLnrAvRb98Etznt2jh7umYnujOX+454/hbuwiSrfNN+dDqg66axJnzqT0HlKJHRuSCBuSCBuSCBuSCBuSMvJNUMmhg9xrawav7sA7+a/Gyf4hU2n9UHMerzvgrtky5hpzvnLF7e6awp0Rc37r0u3umv23vGXOS1b4pzwl1fYpTzpgx4YkwoYkwoYkwoYkwoYkwoakjDzu++Fu+0XtqfZQ03j32uat5eZ8z8zn3TUV/eeZ8/zV49w1V6zdac5Lavyjtsj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YkETYkMSpSBrIikbdawdWlZrzxaM/ddc8eOXPoe9h0v0LzXn+eucn/NIcOzYkETYkETYkETYkETYkETYk8eL3NJBo9l8WXzLvK3P+yeCR7prc9TFzXpR3zF1zeqCdQr67Ir2xY0MSYUMSYUMSYUMSYUMSD0FBEjs2JBE2JBE2JBE2JBE2JBE2JBE2JBE2JBE2JBE2JBE2JBE2JP0Nh90b1IXohzwAAAAASUVORK5CYII=\" id=\"image1886fd32ec\" transform=\"scale(1 -1) translate(0 -131.04)\" x=\"10.7\" y=\"-178.261654\" width=\"131.04\" height=\"131.04\"/>\n",
       "   </g>\n",
       "   <g id=\"matplotlib.axis_7\"/>\n",
       "   <g id=\"matplotlib.axis_8\"/>\n",
       "   <g id=\"patch_18\">\n",
       "    <path d=\"M 10.7 309.301654 \n",
       "L 10.7 178.854596 \n",
       "\" style=\"fill: none; stroke: #000000; stroke-width: 0.8; stroke-linejoin: miter; stroke-linecap: square\"/>\n",
       "   </g>\n",
       "   <g id=\"patch_19\">\n",
       "    <path d=\"M 141.147059 309.301654 \n",
       "L 141.147059 178.854596 \n",
       "\" style=\"fill: none; stroke: #000000; stroke-width: 0.8; stroke-linejoin: miter; stroke-linecap: square\"/>\n",
       "   </g>\n",
       "   <g id=\"patch_20\">\n",
       "    <path d=\"M 10.7 309.301654 \n",
       "L 141.147059 309.301654 \n",
       "\" style=\"fill: none; stroke: #000000; stroke-width: 0.8; stroke-linejoin: miter; stroke-linecap: square\"/>\n",
       "   </g>\n",
       "   <g id=\"patch_21\">\n",
       "    <path d=\"M 10.7 178.854596 \n",
       "L 141.147059 178.854596 \n",
       "\" style=\"fill: none; stroke: #000000; stroke-width: 0.8; stroke-linejoin: miter; stroke-linecap: square\"/>\n",
       "   </g>\n",
       "   <g id=\"text_4\">\n",
       "    <!-- label = 6 -->\n",
       "    <g transform=\"translate(48.752904 172.854596) scale(0.12 -0.12)\">\n",
       "     <defs>\n",
       "      <path id=\"DejaVuSans-36\" d=\"M 2113 2584 \n",
       "Q 1688 2584 1439 2293 \n",
       "Q 1191 2003 1191 1497 \n",
       "Q 1191 994 1439 701 \n",
       "Q 1688 409 2113 409 \n",
       "Q 2538 409 2786 701 \n",
       "Q 3034 994 3034 1497 \n",
       "Q 3034 2003 2786 2293 \n",
       "Q 2538 2584 2113 2584 \n",
       "z\n",
       "M 3366 4563 \n",
       "L 3366 3988 \n",
       "Q 3128 4100 2886 4159 \n",
       "Q 2644 4219 2406 4219 \n",
       "Q 1781 4219 1451 3797 \n",
       "Q 1122 3375 1075 2522 \n",
       "Q 1259 2794 1537 2939 \n",
       "Q 1816 3084 2150 3084 \n",
       "Q 2853 3084 3261 2657 \n",
       "Q 3669 2231 3669 1497 \n",
       "Q 3669 778 3244 343 \n",
       "Q 2819 -91 2113 -91 \n",
       "Q 1303 -91 875 529 \n",
       "Q 447 1150 447 2328 \n",
       "Q 447 3434 972 4092 \n",
       "Q 1497 4750 2381 4750 \n",
       "Q 2619 4750 2861 4703 \n",
       "Q 3103 4656 3366 4563 \n",
       "z\n",
       "\" transform=\"scale(0.015625)\"/>\n",
       "     </defs>\n",
       "     <use xlink:href=\"#DejaVuSans-6c\"/>\n",
       "     <use xlink:href=\"#DejaVuSans-61\" x=\"27.783203\"/>\n",
       "     <use xlink:href=\"#DejaVuSans-62\" x=\"89.0625\"/>\n",
       "     <use xlink:href=\"#DejaVuSans-65\" x=\"152.539062\"/>\n",
       "     <use xlink:href=\"#DejaVuSans-6c\" x=\"214.0625\"/>\n",
       "     <use xlink:href=\"#DejaVuSans-20\" x=\"241.845703\"/>\n",
       "     <use xlink:href=\"#DejaVuSans-3d\" x=\"273.632812\"/>\n",
       "     <use xlink:href=\"#DejaVuSans-20\" x=\"357.421875\"/>\n",
       "     <use xlink:href=\"#DejaVuSans-36\" x=\"389.208984\"/>\n",
       "    </g>\n",
       "   </g>\n",
       "  </g>\n",
       "  <g id=\"axes_5\">\n",
       "   <g id=\"patch_22\">\n",
       "    <path d=\"M 168.252941 309.301654 \n",
       "L 298.7 309.301654 \n",
       "L 298.7 178.854596 \n",
       "L 168.252941 178.854596 \n",
       "z\n",
       "\" style=\"fill: #ffffff\"/>\n",
       "   </g>\n",
       "   <g clip-path=\"url(#p5bc85a7e3c)\">\n",
       "    <image xlink:href=\"data:image/png;base64,\n",
       "iVBORw0KGgoAAAANSUhEUgAAALYAAAC2CAYAAAB08HcEAAAFrklEQVR4nO3d32vVdRzH8c85m+V+0WYh2RhII4dNkLzw4gSxkSSJgy5cFDHK7pwSlO3Cm+qiLqQfBKkEg+gqMhGkYBUVJqTZAqvZtK0NL6abmIMcnW1u50f/wPv9hXM8fs85r/N8XL6/fHa+6JPPxYfz/Z7EjsSefADEJMt9A8DdQNiQRNiQRNiQRNiQRNiQRNiQRNiQRNiQRNiQRNiQRNiQRNiQRNiQRNiQRNiQRNiQRNiQRNiQVF/uG4hLYs097rWpT7vNeT7iadDTT3xkztvrGt01fd299oWc/0HZhQX/JuBix4YkwoYkwoYkwoYkwoakmjkVudW/zb020XOsiL/on354Ri6dMedXM/+5a3qOD5nzzqGfC/78WsKODUmEDUmEDUmEDUmEDUmEDUk1c9xXyTZEfHFq5Nn3zPneXw+6a5q/OH/H91Tt2LEhibAhibAhibAhibAhqWZORdadv+5eO5VuNefPNP17d26mAJ31DeZ84K2v3DWn/u4x5/nfxktxS1WBHRuSCBuSCBuSCBuSCBuSCBuSEjsSeyLed1QbZodS5vyHV95119yftI/hotQl7H0km88V/LeijK+umPOXDr/qrmmZyZrzuVSdu2bDOXtN05Vb7prs+IR7rZTYsSGJsCGJsCGJsCGJsCGJU5EIL/x11b/WcqPgvxfXqUi5bb/wnHvtgb7JWO6BHRuSCBuSCBuSCBuSCBuSCBuSOO6LcGPQ/nJUCCF8d8j+glRbxJejauW4L8qudv8F/KXEjg1JhA1JhA1JhA1JhA1JNfMmqGKsP3bOvbYz+7o5f3rfT+6at9dfvON7qgaH5zeX+xbYsaGJsCGJsCGJsCGJsCGJsCGJL0GVWF1bm3tt7nn7GCyR9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id=\"image8de9109153\" transform=\"scale(1 -1) translate(0 -131.04)\" x=\"168.252941\" y=\"-178.261654\" width=\"131.04\" height=\"131.04\"/>\n",
       "   </g>\n",
       "   <g id=\"matplotlib.axis_9\"/>\n",
       "   <g id=\"matplotlib.axis_10\"/>\n",
       "   <g id=\"patch_23\">\n",
       "    <path d=\"M 168.252941 309.301654 \n",
       "L 168.252941 178.854596 \n",
       "\" style=\"fill: none; stroke: #000000; stroke-width: 0.8; stroke-linejoin: miter; stroke-linecap: square\"/>\n",
       "   </g>\n",
       "   <g id=\"patch_24\">\n",
       "    <path d=\"M 298.7 309.301654 \n",
       "L 298.7 178.854596 \n",
       "\" style=\"fill: none; stroke: #000000; stroke-width: 0.8; stroke-linejoin: miter; stroke-linecap: square\"/>\n",
       "   </g>\n",
       "   <g id=\"patch_25\">\n",
       "    <path d=\"M 168.252941 309.301654 \n",
       "L 298.7 309.301654 \n",
       "\" style=\"fill: none; stroke: #000000; stroke-width: 0.8; stroke-linejoin: miter; stroke-linecap: square\"/>\n",
       "   </g>\n",
       "   <g id=\"patch_26\">\n",
       "    <path d=\"M 168.252941 178.854596 \n",
       "L 298.7 178.854596 \n",
       "\" style=\"fill: none; stroke: #000000; stroke-width: 0.8; stroke-linejoin: miter; stroke-linecap: square\"/>\n",
       "   </g>\n",
       "   <g id=\"text_5\">\n",
       "    <!-- label = 2 -->\n",
       "    <g transform=\"translate(206.305846 172.854596) scale(0.12 -0.12)\">\n",
       "     <defs>\n",
       "      <path id=\"DejaVuSans-32\" d=\"M 1228 531 \n",
       "L 3431 531 \n",
       "L 3431 0 \n",
       "L 469 0 \n",
       "L 469 531 \n",
       "Q 828 903 1448 1529 \n",
       "Q 2069 2156 2228 2338 \n",
       "Q 2531 2678 2651 2914 \n",
       "Q 2772 3150 2772 3378 \n",
       "Q 2772 3750 2511 3984 \n",
       "Q 2250 4219 1831 4219 \n",
       "Q 1534 4219 1204 4116 \n",
       "Q 875 4013 500 3803 \n",
       "L 500 4441 \n",
       "Q 881 4594 1212 4672 \n",
       "Q 1544 4750 1819 4750 \n",
       "Q 2544 4750 2975 4387 \n",
       "Q 3406 4025 3406 3419 \n",
       "Q 3406 3131 3298 2873 \n",
       "Q 3191 2616 2906 2266 \n",
       "Q 2828 2175 2409 1742 \n",
       "Q 1991 1309 1228 531 \n",
       "z\n",
       "\" transform=\"scale(0.015625)\"/>\n",
       "     </defs>\n",
       "     <use xlink:href=\"#DejaVuSans-6c\"/>\n",
       "     <use xlink:href=\"#DejaVuSans-61\" x=\"27.783203\"/>\n",
       "     <use xlink:href=\"#DejaVuSans-62\" x=\"89.0625\"/>\n",
       "     <use xlink:href=\"#DejaVuSans-65\" x=\"152.539062\"/>\n",
       "     <use xlink:href=\"#DejaVuSans-6c\" x=\"214.0625\"/>\n",
       "     <use xlink:href=\"#DejaVuSans-20\" x=\"241.845703\"/>\n",
       "     <use xlink:href=\"#DejaVuSans-3d\" x=\"273.632812\"/>\n",
       "     <use xlink:href=\"#DejaVuSans-20\" x=\"357.421875\"/>\n",
       "     <use xlink:href=\"#DejaVuSans-32\" x=\"389.208984\"/>\n",
       "    </g>\n",
       "   </g>\n",
       "  </g>\n",
       "  <g id=\"axes_6\">\n",
       "   <g id=\"patch_27\">\n",
       "    <path d=\"M 325.805882 309.301654 \n",
       "L 456.252941 309.301654 \n",
       "L 456.252941 178.854596 \n",
       "L 325.805882 178.854596 \n",
       "z\n",
       "\" style=\"fill: #ffffff\"/>\n",
       "   </g>\n",
       "   <g clip-path=\"url(#p74581819f6)\">\n",
       "    <image xlink:href=\"data:image/png;base64,\n",
       "iVBORw0KGgoAAAANSUhEUgAAALYAAAC2CAYAAAB08HcEAAAF8UlEQVR4nO3dX2iVdRzH8d85x7U/bWtTm2CzNGjK+rPENGkXRs2CuRFbGyXkhV30B/Om1C4ShIggi2BlpIb0Fwolyqh5od5klqsgSfuzNYi1aeZcqbm29Jyti4govt/R83TmmZ+9X5ffh9/jw/bmB/54dk6iLtEyGgAxyVw/ADAeCBu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v3TDw87NiQRNiQRNiQRNiQRNiQRNiTl/G8es+3oOvvFqbX3bnfXeB/8fmpk2F1zT5P9AtDo54fdNSs7e8x5a/GAu2bxF3eb86kNXe4asGNDFGFDEmFDEmFDEmFDUs5fgsq2mRs/NufP97e6a4bX7TTnK0t73TVvvLPFnN+44xF3TUGy273mmVNmn5icinynyYUdG5IIG5IIG5IIG5IIG5IIG5LkXoKKI1VdZc6/WVPqrum63T7ui2Osr8PbN2yfyG6sb3bXZDqjHyuqYceGJMKGJMKGJMKGJMKGJLmXoOLIfG3/mdXc+/wfT9WmB815V+OLWXmmv9QWnDPn6WkXu2v8M5bJgx0bkggbkggbkggbkggbkggbkjjuG8NoOu1em7v6oDmvCvYxYAghfNv4gjlPBv/r4xAPOzYkETYkETYkETYkETYkcSoS0+i5s+a86gH7a/JCCGHeyCpz3n3H5sj//nBFvnutMPLd9LBjQxJhQxJhQxJhQxJhQxJhQxKfBDUBdG1Z6F9rsI8C9w4VuWvaam4w5yODg9Ee7ALGjg1JhA1JhA1JhA1JhA1JvAQ1AVQ/fsS99vbN0815a7H9NXkhhPBcHr9WdmxIImxIImxIImxIImxIImxI4iUoSGLHhiTChiTChiTChiTChiTChiTChiTChiTChiTChiTChiTChiTChiTChiTChiTChiTChiTChiTChiTChiTChiTChiTChiTChiTChiTChiTChiTChiTChiTChiTChqQ/AFBg51K23vbHAAAAAElFTkSuQmCC\" id=\"image809b0e33c1\" transform=\"scale(1 -1) translate(0 -131.04)\" x=\"325.805882\" y=\"-178.261654\" width=\"131.04\" height=\"131.04\"/>\n",
       "   </g>\n",
       "   <g id=\"matplotlib.axis_11\"/>\n",
       "   <g id=\"matplotlib.axis_12\"/>\n",
       "   <g id=\"patch_28\">\n",
       "    <path d=\"M 325.805882 309.301654 \n",
       "L 325.805882 178.854596 \n",
       "\" style=\"fill: none; stroke: #000000; stroke-width: 0.8; stroke-linejoin: miter; stroke-linecap: square\"/>\n",
       "   </g>\n",
       "   <g id=\"patch_29\">\n",
       "    <path d=\"M 456.252941 309.301654 \n",
       "L 456.252941 178.854596 \n",
       "\" style=\"fill: none; stroke: #000000; stroke-width: 0.8; stroke-linejoin: miter; stroke-linecap: square\"/>\n",
       "   </g>\n",
       "   <g id=\"patch_30\">\n",
       "    <path d=\"M 325.805882 309.301654 \n",
       "L 456.252941 309.301654 \n",
       "\" style=\"fill: none; stroke: #000000; stroke-width: 0.8; stroke-linejoin: miter; stroke-linecap: square\"/>\n",
       "   </g>\n",
       "   <g id=\"patch_31\">\n",
       "    <path d=\"M 325.805882 178.854596 \n",
       "L 456.252941 178.854596 \n",
       "\" style=\"fill: none; stroke: #000000; stroke-width: 0.8; stroke-linejoin: miter; stroke-linecap: square\"/>\n",
       "   </g>\n",
       "   <g id=\"text_6\">\n",
       "    <!-- label = 4 -->\n",
       "    <g transform=\"translate(363.858787 172.854596) scale(0.12 -0.12)\">\n",
       "     <use xlink:href=\"#DejaVuSans-6c\"/>\n",
       "     <use xlink:href=\"#DejaVuSans-61\" x=\"27.783203\"/>\n",
       "     <use xlink:href=\"#DejaVuSans-62\" x=\"89.0625\"/>\n",
       "     <use xlink:href=\"#DejaVuSans-65\" x=\"152.539062\"/>\n",
       "     <use xlink:href=\"#DejaVuSans-6c\" x=\"214.0625\"/>\n",
       "     <use xlink:href=\"#DejaVuSans-20\" x=\"241.845703\"/>\n",
       "     <use xlink:href=\"#DejaVuSans-3d\" x=\"273.632812\"/>\n",
       "     <use xlink:href=\"#DejaVuSans-20\" x=\"357.421875\"/>\n",
       "     <use xlink:href=\"#DejaVuSans-34\" x=\"389.208984\"/>\n",
       "    </g>\n",
       "   </g>\n",
       "  </g>\n",
       "  <g id=\"axes_7\">\n",
       "   <g id=\"patch_32\">\n",
       "    <path d=\"M 10.7 465.838125 \n",
       "L 141.147059 465.838125 \n",
       "L 141.147059 335.391066 \n",
       "L 10.7 335.391066 \n",
       "z\n",
       "\" style=\"fill: #ffffff\"/>\n",
       "   </g>\n",
       "   <g clip-path=\"url(#p9a7ae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2kYRNJGETSdhEEjaRPPfNUiuW/NZc+7OH57hQubGJJGwiCZtIwiaSsIkkbCIJm0jCJpKwiSRsIgmbSMImkrCJJGwiCZtIwiaSsIkkbCL507Ae+vfuNdX5rqvf6u1B5gA3NpGETSRhE0nYRBI2kYRNJM99PXRia/3L2tdfPN7jk+RzYxNJ2EQSNpGETSRhE8mrSA+9fcdIY6XT3PPR2SXV+dhzK5t7+srP3RwrkhubSMImkrCJJGwiCZtIwiaS575p9su2dc21gfkHGiuLmnt2fri1/lmfHezmWHOOG5tIwiaSsIkkbCIJm0heRaZo3rLLq/MVj5xo7rmsr/76ceDv9v0ysNPrx1S4sYkkbCIJm0jCJpKwiSRsInnum6rly6rj9wfe6fFBqHFjE0nYRBI2kYRNJGETyavIVJ2uf9vS6leeaG7Zt/3F6vyxT55q7rmufNnduSiluLEJJWwiCZtIwiaSsIkkbCJ1BjvD9f/RBrOYG5tIwiaSsIkkbCIJm0jCJpKwiSRsIgmbSMImkrCJJGwiCZtIwiaSsIkkbCIJm0jCJtJ/c7mH7pze8GUAAAAASUVORK5CYII=\" id=\"imagefb7e292bf6\" transform=\"scale(1 -1) translate(0 -131.04)\" x=\"10.7\" y=\"-334.798125\" width=\"131.04\" height=\"131.04\"/>\n",
       "   </g>\n",
       "   <g id=\"matplotlib.axis_13\"/>\n",
       "   <g id=\"matplotlib.axis_14\"/>\n",
       "   <g id=\"patch_33\">\n",
       "    <path d=\"M 10.7 465.838125 \n",
       "L 10.7 335.391066 \n",
       "\" style=\"fill: none; stroke: #000000; stroke-width: 0.8; stroke-linejoin: miter; stroke-linecap: square\"/>\n",
       "   </g>\n",
       "   <g id=\"patch_34\">\n",
       "    <path d=\"M 141.147059 465.838125 \n",
       "L 141.147059 335.391066 \n",
       "\" style=\"fill: none; stroke: #000000; stroke-width: 0.8; stroke-linejoin: miter; stroke-linecap: square\"/>\n",
       "   </g>\n",
       "   <g id=\"patch_35\">\n",
       "    <path d=\"M 10.7 465.838125 \n",
       "L 141.147059 465.838125 \n",
       "\" style=\"fill: none; stroke: #000000; stroke-width: 0.8; stroke-linejoin: miter; stroke-linecap: square\"/>\n",
       "   </g>\n",
       "   <g id=\"patch_36\">\n",
       "    <path d=\"M 10.7 335.391066 \n",
       "L 141.147059 335.391066 \n",
       "\" style=\"fill: none; stroke: #000000; stroke-width: 0.8; stroke-linejoin: miter; stroke-linecap: square\"/>\n",
       "   </g>\n",
       "   <g id=\"text_7\">\n",
       "    <!-- label = 2 -->\n",
       "    <g transform=\"translate(48.752904 329.391066) scale(0.12 -0.12)\">\n",
       "     <use xlink:href=\"#DejaVuSans-6c\"/>\n",
       "     <use xlink:href=\"#DejaVuSans-61\" x=\"27.783203\"/>\n",
       "     <use xlink:href=\"#DejaVuSans-62\" x=\"89.0625\"/>\n",
       "     <use xlink:href=\"#DejaVuSans-65\" x=\"152.539062\"/>\n",
       "     <use xlink:href=\"#DejaVuSans-6c\" x=\"214.0625\"/>\n",
       "     <use xlink:href=\"#DejaVuSans-20\" x=\"241.845703\"/>\n",
       "     <use xlink:href=\"#DejaVuSans-3d\" x=\"273.632812\"/>\n",
       "     <use xlink:href=\"#DejaVuSans-20\" x=\"357.421875\"/>\n",
       "     <use xlink:href=\"#DejaVuSans-32\" x=\"389.208984\"/>\n",
       "    </g>\n",
       "   </g>\n",
       "  </g>\n",
       "  <g id=\"axes_8\">\n",
       "   <g id=\"patch_37\">\n",
       "    <path d=\"M 168.252941 465.838125 \n",
       "L 298.7 465.838125 \n",
       "L 298.7 335.391066 \n",
       "L 168.252941 335.391066 \n",
       "z\n",
       "\" style=\"fill: #ffffff\"/>\n",
       "   </g>\n",
       "   <g clip-path=\"url(#p6a0fcbff0f)\">\n",
       "    <image xlink:href=\"data:image/png;base64,\n",
       "iVBORw0KGgoAAAANSUhEUgAAALYAAAC2CAYAAAB08HcEAAAFw0lEQVR4nO3c7UvdZRzH8es4RduieiA4UecszQ0JjCxskYsyKBezB0KtVRQR6w5SZEV0Q1AtaLStm1F7sIhJ9G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YkwoYkwoYkwoYkwoakSH2kKZbqTSTFkWL3UW62/f/76fp/3DWxmem4t5RsOV2F7rMNhcfM+Z7KkkRtJ6E4sSGJsCGJsCGJsCGJsCGJsCFJ7iUoz/RW/6rr4O5Pzfk9Dc+6a646YF+PpYPslSvM+WsrvnbXbOx43pyXh58WZU/JxokNSYQNSYQNSYQNSYQNSRlzK5J7+Lj7rLL9OXO+d8dH7ponKprNedEHve6aZL049XurfQNUnnPZXZPfF0nUdlKCExuSCBuSCBuSCBuSCBuSCBuSMua6Lzbrf7do5YGoOS9ZP+Ou6WuxrwLvOmtfHYYQwtV7f3afLVR2Wan7rKvxfXO+9pOX3DXFe47Gvad0wokNSYQNSYQNSYQNSYQNSRlzKzKfnO/tF5dq97e6awaadprz7e997K55o/0Ocz7fy1FLKq435zVfDbhrhmeXmvOSzgl3jdrnwDixIYmwIYmwIYmwIYmwIYmwISlzPvz+H2Tl5bnPpjqWm/POqn3umhdH7Ou+7qEb3DV9tZ/be5vnTGqsvs+cRy9ccNeo4cSGJMKGJMKGJMKGJMKGJF6CmsfcZf/LSUsfumTOb9zif1P7zHr7O9xLivxvUG86V2fOu76rdteUjfW4zzIFJzYkETYkETYkETYkETYkETYk8RIUJHFiQxJhQxJhQxJhQxJhQxJhQxJhQxJhQxJhQxJhQxJhQxJhQxJhQxJhQxJhQxJhQxJhQxJhQxJhQxJhQxJhQxJhQxJhQxJhQxJhQxJhQxJhQxJhQxJhQxJhQxJhQ9K/gEjnkC20Q5QAAAAASUVORK5CYII=\" id=\"image19bc6c752c\" transform=\"scale(1 -1) translate(0 -131.04)\" x=\"168.252941\" y=\"-334.798125\" width=\"131.04\" height=\"131.04\"/>\n",
       "   </g>\n",
       "   <g id=\"matplotlib.axis_15\"/>\n",
       "   <g id=\"matplotlib.axis_16\"/>\n",
       "   <g id=\"patch_38\">\n",
       "    <path d=\"M 168.252941 465.838125 \n",
       "L 168.252941 335.391066 \n",
       "\" style=\"fill: none; stroke: #000000; stroke-width: 0.8; stroke-linejoin: miter; stroke-linecap: square\"/>\n",
       "   </g>\n",
       "   <g id=\"patch_39\">\n",
       "    <path d=\"M 298.7 465.838125 \n",
       "L 298.7 335.391066 \n",
       "\" style=\"fill: none; stroke: #000000; stroke-width: 0.8; stroke-linejoin: miter; stroke-linecap: square\"/>\n",
       "   </g>\n",
       "   <g id=\"patch_40\">\n",
       "    <path d=\"M 168.252941 465.838125 \n",
       "L 298.7 465.838125 \n",
       "\" style=\"fill: none; stroke: #000000; stroke-width: 0.8; stroke-linejoin: miter; stroke-linecap: square\"/>\n",
       "   </g>\n",
       "   <g id=\"patch_41\">\n",
       "    <path d=\"M 168.252941 335.391066 \n",
       "L 298.7 335.391066 \n",
       "\" style=\"fill: none; stroke: #000000; stroke-width: 0.8; stroke-linejoin: miter; stroke-linecap: square\"/>\n",
       "   </g>\n",
       "   <g id=\"text_8\">\n",
       "    <!-- label = 0 -->\n",
       "    <g transform=\"translate(206.305846 329.391066) scale(0.12 -0.12)\">\n",
       "     <defs>\n",
       "      <path id=\"DejaVuSans-30\" d=\"M 2034 4250 \n",
       "Q 1547 4250 1301 3770 \n",
       "Q 1056 3291 1056 2328 \n",
       "Q 1056 1369 1301 889 \n",
       "Q 1547 409 2034 409 \n",
       "Q 2525 409 2770 889 \n",
       "Q 3016 1369 3016 2328 \n",
       "Q 3016 3291 2770 3770 \n",
       "Q 2525 4250 2034 4250 \n",
       "z\n",
       "M 2034 4750 \n",
       "Q 2819 4750 3233 4129 \n",
       "Q 3647 3509 3647 2328 \n",
       "Q 3647 1150 3233 529 \n",
       "Q 2819 -91 2034 -91 \n",
       "Q 1250 -91 836 529 \n",
       "Q 422 1150 422 2328 \n",
       "Q 422 3509 836 4129 \n",
       "Q 1250 4750 2034 4750 \n",
       "z\n",
       "\" transform=\"scale(0.015625)\"/>\n",
       "     </defs>\n",
       "     <use xlink:href=\"#DejaVuSans-6c\"/>\n",
       "     <use xlink:href=\"#DejaVuSans-61\" x=\"27.783203\"/>\n",
       "     <use xlink:href=\"#DejaVuSans-62\" x=\"89.0625\"/>\n",
       "     <use xlink:href=\"#DejaVuSans-65\" x=\"152.539062\"/>\n",
       "     <use xlink:href=\"#DejaVuSans-6c\" x=\"214.0625\"/>\n",
       "     <use xlink:href=\"#DejaVuSans-20\" x=\"241.845703\"/>\n",
       "     <use xlink:href=\"#DejaVuSans-3d\" x=\"273.632812\"/>\n",
       "     <use xlink:href=\"#DejaVuSans-20\" x=\"357.421875\"/>\n",
       "     <use xlink:href=\"#DejaVuSans-30\" x=\"389.208984\"/>\n",
       "    </g>\n",
       "   </g>\n",
       "  </g>\n",
       "  <g id=\"axes_9\">\n",
       "   <g id=\"patch_42\">\n",
       "    <path d=\"M 325.805882 465.838125 \n",
       "L 456.252941 465.838125 \n",
       "L 456.252941 335.391066 \n",
       "L 325.805882 335.391066 \n",
       "z\n",
       "\" style=\"fill: #ffffff\"/>\n",
       "   </g>\n",
       "   <g clip-path=\"url(#pff0eef9650)\">\n",
       "    <image xlink:href=\"data:image/png;base64,\n",
       "iVBORw0KGgoAAAANSUhEUgAAALYAAAC2CAYAAAB08HcEAAAEyklEQVR4nO3d3YtVVRzH4X1GQ7MYaAITRSbKlzLDi94wgiQFKSxCBIMIekMQcrAgbyuIkt7MIowCCQmCLiqjQIiGiNLIBiFMKmPACiObqW4KbXLsH1hr4oyno33neS5/m+XZjh/XxWKfPa1VrXWnGgjTc6ZvAP4LwiaSsIkkbCIJm0jCJpKwiSRsIgmbSMImkrCJJGwiCZtIwiaSsIkkbCIJm0jCJpKwiTT9TN/A/9XIhuXF+d5HXqiu6ansI1c/s6m6Zs62ve3dGE3T2LEJJWwiCZtIwiaSsInU8iaoyflj3XXF+dFbx6prvln1anE+dKL+OVse3Ficn7v78/oi7NhkEjaRhE0kYRNJ2EQSNpEc93XRL+8uLs73XfV6dc0NB+4szvvWfNuRe0plxyaSsIkkbCIJm0jCJpKvhnXRbz/3Fue1r4wxeX6iRBI2kYRNJGETSdhEEjaRHPc1TTNt8YL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CJJGwiCZtIwiaSsIkkbCIJm0jCJpKwiSRsIgmbSMImkrCJJGwiCZtIwiaSsIkkbCIJm0jCJpKwiSRsIgmbSP8Aq6Gim/ciHPkAAAAASUVORK5CYII=\" id=\"imageacfefe2177\" transform=\"scale(1 -1) translate(0 -131.04)\" x=\"325.805882\" y=\"-334.798125\" width=\"131.04\" height=\"131.04\"/>\n",
       "   </g>\n",
       "   <g id=\"matplotlib.axis_17\"/>\n",
       "   <g id=\"matplotlib.axis_18\"/>\n",
       "   <g id=\"patch_43\">\n",
       "    <path d=\"M 325.805882 465.838125 \n",
       "L 325.805882 335.391066 \n",
       "\" style=\"fill: none; stroke: #000000; stroke-width: 0.8; stroke-linejoin: miter; stroke-linecap: square\"/>\n",
       "   </g>\n",
       "   <g id=\"patch_44\">\n",
       "    <path d=\"M 456.252941 465.838125 \n",
       "L 456.252941 335.391066 \n",
       "\" style=\"fill: none; stroke: #000000; stroke-width: 0.8; stroke-linejoin: miter; stroke-linecap: square\"/>\n",
       "   </g>\n",
       "   <g id=\"patch_45\">\n",
       "    <path d=\"M 325.805882 465.838125 \n",
       "L 456.252941 465.838125 \n",
       "\" style=\"fill: none; stroke: #000000; stroke-width: 0.8; stroke-linejoin: miter; stroke-linecap: square\"/>\n",
       "   </g>\n",
       "   <g id=\"patch_46\">\n",
       "    <path d=\"M 325.805882 335.391066 \n",
       "L 456.252941 335.391066 \n",
       "\" style=\"fill: none; stroke: #000000; stroke-width: 0.8; stroke-linejoin: miter; stroke-linecap: square\"/>\n",
       "   </g>\n",
       "   <g id=\"text_9\">\n",
       "    <!-- label = 8 -->\n",
       "    <g transform=\"translate(363.858787 329.391066) scale(0.12 -0.12)\">\n",
       "     <defs>\n",
       "      <path id=\"DejaVuSans-38\" d=\"M 2034 2216 \n",
       "Q 1584 2216 1326 1975 \n",
       "Q 1069 1734 1069 1313 \n",
       "Q 1069 891 1326 650 \n",
       "Q 1584 409 2034 409 \n",
       "Q 2484 409 2743 651 \n",
       "Q 3003 894 3003 1313 \n",
       "Q 3003 1734 2745 1975 \n",
       "Q 2488 2216 2034 2216 \n",
       "z\n",
       "M 1403 2484 \n",
       "Q 997 2584 770 2862 \n",
       "Q 544 3141 544 3541 \n",
       "Q 544 4100 942 4425 \n",
       "Q 1341 4750 2034 4750 \n",
       "Q 2731 4750 3128 4425 \n",
       "Q 3525 4100 3525 3541 \n",
       "Q 3525 3141 3298 2862 \n",
       "Q 3072 2584 2669 2484 \n",
       "Q 3125 2378 3379 2068 \n",
       "Q 3634 1759 3634 1313 \n",
       "Q 3634 634 3220 271 \n",
       "Q 2806 -91 2034 -91 \n",
       "Q 1263 -91 848 271 \n",
       "Q 434 634 434 1313 \n",
       "Q 434 1759 690 2068 \n",
       "Q 947 2378 1403 2484 \n",
       "z\n",
       "M 1172 3481 \n",
       "Q 1172 3119 1398 2916 \n",
       "Q 1625 2713 2034 2713 \n",
       "Q 2441 2713 2670 2916 \n",
       "Q 2900 3119 2900 3481 \n",
       "Q 2900 3844 2670 4047 \n",
       "Q 2441 4250 2034 4250 \n",
       "Q 1625 4250 1398 4047 \n",
       "Q 1172 3844 1172 3481 \n",
       "z\n",
       "\" transform=\"scale(0.015625)\"/>\n",
       "     </defs>\n",
       "     <use xlink:href=\"#DejaVuSans-6c\"/>\n",
       "     <use xlink:href=\"#DejaVuSans-61\" x=\"27.783203\"/>\n",
       "     <use xlink:href=\"#DejaVuSans-62\" x=\"89.0625\"/>\n",
       "     <use xlink:href=\"#DejaVuSans-65\" x=\"152.539062\"/>\n",
       "     <use xlink:href=\"#DejaVuSans-6c\" x=\"214.0625\"/>\n",
       "     <use xlink:href=\"#DejaVuSans-20\" x=\"241.845703\"/>\n",
       "     <use xlink:href=\"#DejaVuSans-3d\" x=\"273.632812\"/>\n",
       "     <use xlink:href=\"#DejaVuSans-20\" x=\"357.421875\"/>\n",
       "     <use xlink:href=\"#DejaVuSans-38\" x=\"389.208984\"/>\n",
       "    </g>\n",
       "   </g>\n",
       "  </g>\n",
       " </g>\n",
       " <defs>\n",
       "  <clipPath id=\"pc8e9eb6630\">\n",
       "   <rect x=\"10.7\" y=\"22.318125\" width=\"130.447059\" height=\"130.447059\"/>\n",
       "  </clipPath>\n",
       "  <clipPath id=\"p6a49a0c006\">\n",
       "   <rect x=\"168.252941\" y=\"22.318125\" width=\"130.447059\" height=\"130.447059\"/>\n",
       "  </clipPath>\n",
       "  <clipPath id=\"p4f6b4d646a\">\n",
       "   <rect x=\"325.805882\" y=\"22.318125\" width=\"130.447059\" height=\"130.447059\"/>\n",
       "  </clipPath>\n",
       "  <clipPath id=\"p857d5961c7\">\n",
       "   <rect x=\"10.7\" y=\"178.854596\" width=\"130.447059\" height=\"130.447059\"/>\n",
       "  </clipPath>\n",
       "  <clipPath id=\"p5bc85a7e3c\">\n",
       "   <rect x=\"168.252941\" y=\"178.854596\" width=\"130.447059\" height=\"130.447059\"/>\n",
       "  </clipPath>\n",
       "  <clipPath id=\"p74581819f6\">\n",
       "   <rect x=\"325.805882\" y=\"178.854596\" width=\"130.447059\" height=\"130.447059\"/>\n",
       "  </clipPath>\n",
       "  <clipPath id=\"p9a7aeb91d8\">\n",
       "   <rect x=\"10.7\" y=\"335.391066\" width=\"130.447059\" height=\"130.447059\"/>\n",
       "  </clipPath>\n",
       "  <clipPath id=\"p6a0fcbff0f\">\n",
       "   <rect x=\"168.252941\" y=\"335.391066\" width=\"130.447059\" height=\"130.447059\"/>\n",
       "  </clipPath>\n",
       "  <clipPath id=\"pff0eef9650\">\n",
       "   <rect x=\"325.805882\" y=\"335.391066\" width=\"130.447059\" height=\"130.447059\"/>\n",
       "  </clipPath>\n",
       " </defs>\n",
       "</svg>\n"
      ],
      "text/plain": [
       "<Figure size 800x800 with 9 Axes>"
      ]
     },
     "metadata": {},
     "output_type": "display_data"
    }
   ],
   "source": [
    "%matplotlib inline\n",
    "%config InlineBackend.figure_format = 'svg'\n",
    "\n",
    "#查看部分样本\n",
    "from matplotlib import pyplot as plt \n",
    "\n",
    "plt.figure(figsize=(8,8)) \n",
    "for i in range(9):\n",
    "    img,label = ds_train[i]\n",
    "    img = img.permute(1,2,0)\n",
    "    ax=plt.subplot(3,3,i+1)\n",
    "    ax.imshow(img.numpy())\n",
    "    ax.set_title(\"label = %d\"%label)\n",
    "    ax.set_xticks([])\n",
    "    ax.set_yticks([]) \n",
    "plt.show()\n"
   ]
  },
  {
   "cell_type": "markdown",
   "id": "485da125",
   "metadata": {},
   "source": [
    "### 2, create the  model"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": null,
   "id": "fdfe5da6-774a-46a1-998d-b07a3bec4970",
   "metadata": {},
   "outputs": [],
   "source": []
  },
  {
   "cell_type": "code",
   "execution_count": 6,
   "id": "196d911d-7745-450e-ae1d-ebcc59db600a",
   "metadata": {},
   "outputs": [],
   "source": [
    "def create_net():\n",
    "    net = nn.Sequential()\n",
    "    net.add_module(\"conv1\",nn.Conv2d(in_channels=1,out_channels=32,kernel_size = 3))\n",
    "    net.add_module(\"pool1\",nn.MaxPool2d(kernel_size = 2,stride = 2))\n",
    "    net.add_module(\"conv2\",nn.Conv2d(in_channels=32,out_channels=64,kernel_size = 5))\n",
    "    net.add_module(\"pool2\",nn.MaxPool2d(kernel_size = 2,stride = 2))\n",
    "    net.add_module(\"dropout\",nn.Dropout2d(p = 0.1))\n",
    "    net.add_module(\"adaptive_pool\",nn.AdaptiveMaxPool2d((1,1)))\n",
    "    net.add_module(\"flatten\",nn.Flatten())\n",
    "    net.add_module(\"linear1\",nn.Linear(64,32))\n",
    "    net.add_module(\"relu\",nn.ReLU())\n",
    "    net.add_module(\"linear2\",nn.Linear(32,10))\n",
    "    return net\n",
    "\n",
    "class Accuracy(nn.Module):\n",
    "    def __init__(self):\n",
    "        super().__init__()\n",
    "\n",
    "        self.correct = nn.Parameter(torch.tensor(0.0),requires_grad=False)\n",
    "        self.total = nn.Parameter(torch.tensor(0.0),requires_grad=False)\n",
    "\n",
    "    def forward(self, preds: torch.Tensor, targets: torch.Tensor):\n",
    "        preds = preds.argmax(dim=-1)\n",
    "        m = (preds == targets).sum()\n",
    "        n = targets.shape[0] \n",
    "        self.correct += m \n",
    "        self.total += n\n",
    "        \n",
    "        return m/n\n",
    "\n",
    "    def compute(self):\n",
    "        return self.correct.float() / self.total \n",
    "    \n",
    "    def reset(self):\n",
    "        self.correct -= self.correct\n",
    "        self.total -= self.total\n",
    "        \n",
    "        "
   ]
  },
  {
   "cell_type": "markdown",
   "id": "6f9d44f4-3194-4f5e-8a96-c446b476cd4a",
   "metadata": {},
   "source": [
    "### 3, train the  model"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 7,
   "id": "9cd28353-e6d7-4d64-b887-b537539464c2",
   "metadata": {},
   "outputs": [],
   "source": [
    "net = create_net()\n",
    "loss_fn = nn.CrossEntropyLoss()\n",
    "metrics_dict = {\"acc\":Accuracy()}\n"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 8,
   "id": "d482bc42-eeda-47fb-a556-a9225156d8f4",
   "metadata": {},
   "outputs": [],
   "source": [
    "from importlib import reload \n",
    "from torchkeras import hugmodel\n",
    "reload(hugmodel)\n",
    "from torchkeras.hugmodel import HugModel \n",
    "\n"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 9,
   "id": "3f3514c0-1a80-4f8f-a3c8-c23a4a939a09",
   "metadata": {},
   "outputs": [],
   "source": [
    "#from torchkeras import HugModel\n",
    "model = HugModel(net,loss_fn,metrics_dict)\n",
    "\n"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 11,
   "id": "b2fb4edb-bfa8-4772-a767-64567d08076a",
   "metadata": {},
   "outputs": [
    {
     "name": "stderr",
     "output_type": "stream",
     "text": [
      "/Users/liangyun2/miniforge3/envs/tf26/lib/python3.9/site-packages/transformers/optimization.py:407: FutureWarning: This implementation of AdamW is deprecated and will be removed in a future version. Use the PyTorch implementation torch.optim.AdamW instead, or set `no_deprecation_warning=True` to disable this warning\n",
      "  warnings.warn(\n"
     ]
    },
    {
     "data": {
      "image/svg+xml": [
       "<?xml version=\"1.0\" encoding=\"utf-8\" standalone=\"no\"?>\n",
       "<!DOCTYPE svg PUBLIC \"-//W3C//DTD SVG 1.1//EN\"\n",
       "  \"http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd\">\n",
       "<svg xmlns:xlink=\"http://www.w3.org/1999/xlink\" width=\"385.78125pt\" height=\"281.634375pt\" viewBox=\"0 0 385.78125 281.634375\" xmlns=\"http://www.w3.org/2000/svg\" version=\"1.1\">\n",
       " <metadata>\n",
       "  <rdf:RDF xmlns:dc=\"http://purl.org/dc/elements/1.1/\" xmlns:cc=\"http://creativecommons.org/ns#\" xmlns:rdf=\"http://www.w3.org/1999/02/22-rdf-syntax-ns#\">\n",
       "   <cc:Work>\n",
       "    <dc:type rdf:resource=\"http://purl.org/dc/dcmitype/StillImage\"/>\n",
       "    <dc:date>2023-07-22T07:33:55.539621</dc:date>\n",
       "    <dc:format>image/svg+xml</dc:format>\n",
       "    <dc:creator>\n",
       "     <cc:Agent>\n",
       "      <dc:title>Matplotlib v3.6.2, https://matplotlib.org/</dc:title>\n",
       "     </cc:Agent>\n",
       "    </dc:creator>\n",
       "   </cc:Work>\n",
       "  </rdf:RDF>\n",
       " </metadata>\n",
       " <defs>\n",
       "  <style type=\"text/css\">*{stroke-linejoin: round; stroke-linecap: butt}</style>\n",
       " </defs>\n",
       " <g id=\"figure_1\">\n",
       "  <g id=\"patch_1\">\n",
       "   <path d=\"M 0 281.634375 \n",
       "L 385.78125 281.634375 \n",
       "L 385.78125 0 \n",
       "L 0 0 \n",
       "z\n",
       "\" style=\"fill: #ffffff\"/>\n",
       "  </g>\n",
       "  <g id=\"axes_1\">\n",
       "   <g id=\"patch_2\">\n",
       "    <path d=\"M 43.78125 244.078125 \n",
       "L 378.58125 244.078125 \n",
       "L 378.58125 22.318125 \n",
       "L 43.78125 22.318125 \n",
       "z\n",
       "\" style=\"fill: #ffffff\"/>\n",
       "   </g>\n",
       "   <g id=\"matplotlib.axis_1\">\n",
       "    <g id=\"xtick_1\">\n",
       "     <g id=\"line2d_1\">\n",
       "      <defs>\n",
       "       <path id=\"md58b676ff6\" d=\"M 0 0 \n",
       "L 0 3.5 \n",
       "\" style=\"stroke: #000000; stroke-width: 0.8\"/>\n",
       "      </defs>\n",
       "      <g>\n",
       "       <use xlink:href=\"#md58b676ff6\" x=\"79.290341\" y=\"244.078125\" style=\"stroke: #000000; stroke-width: 0.8\"/>\n",
       "      </g>\n",
       "     </g>\n",
       "     <g id=\"text_1\">\n",
       "      <!-- 200 -->\n",
       "      <g transform=\"translate(69.746591 258.676562) scale(0.1 -0.1)\">\n",
       "       <defs>\n",
       "        <path id=\"DejaVuSans-32\" d=\"M 1228 531 \n",
       "L 3431 531 \n",
       "L 3431 0 \n",
       "L 469 0 \n",
       "L 469 531 \n",
       "Q 828 903 1448 1529 \n",
       "Q 2069 2156 2228 2338 \n",
       "Q 2531 2678 2651 2914 \n",
       "Q 2772 3150 2772 3378 \n",
       "Q 2772 3750 2511 3984 \n",
       "Q 2250 4219 1831 4219 \n",
       "Q 1534 4219 1204 4116 \n",
       "Q 875 4013 500 3803 \n",
       "L 500 4441 \n",
       "Q 881 4594 1212 4672 \n",
       "Q 1544 4750 1819 4750 \n",
       "Q 2544 4750 2975 4387 \n",
       "Q 3406 4025 3406 3419 \n",
       "Q 3406 3131 3298 2873 \n",
       "Q 3191 2616 2906 2266 \n",
       "Q 2828 2175 2409 1742 \n",
       "Q 1991 1309 1228 531 \n",
       "z\n",
       "\" transform=\"scale(0.015625)\"/>\n",
       "        <path id=\"DejaVuSans-30\" d=\"M 2034 4250 \n",
       "Q 1547 4250 1301 3770 \n",
       "Q 1056 3291 1056 2328 \n",
       "Q 1056 1369 1301 889 \n",
       "Q 1547 409 2034 409 \n",
       "Q 2525 409 2770 889 \n",
       "Q 3016 1369 3016 2328 \n",
       "Q 3016 3291 2770 3770 \n",
       "Q 2525 4250 2034 4250 \n",
       "z\n",
       "M 2034 4750 \n",
       "Q 2819 4750 3233 4129 \n",
       "Q 3647 3509 3647 2328 \n",
       "Q 3647 1150 3233 529 \n",
       "Q 2819 -91 2034 -91 \n",
       "Q 1250 -91 836 529 \n",
       "Q 422 1150 422 2328 \n",
       "Q 422 3509 836 4129 \n",
       "Q 1250 4750 2034 4750 \n",
       "z\n",
       "\" transform=\"scale(0.015625)\"/>\n",
       "       </defs>\n",
       "       <use xlink:href=\"#DejaVuSans-32\"/>\n",
       "       <use xlink:href=\"#DejaVuSans-30\" x=\"63.623047\"/>\n",
       "       <use xlink:href=\"#DejaVuSans-30\" x=\"127.246094\"/>\n",
       "      </g>\n",
       "     </g>\n",
       "    </g>\n",
       "    <g id=\"xtick_2\">\n",
       "     <g id=\"line2d_2\">\n",
       "      <g>\n",
       "       <use xlink:href=\"#md58b676ff6\" x=\"119.872159\" y=\"244.078125\" style=\"stroke: #000000; stroke-width: 0.8\"/>\n",
       "      </g>\n",
       "     </g>\n",
       "     <g id=\"text_2\">\n",
       "      <!-- 400 -->\n",
       "      <g transform=\"translate(110.328409 258.676562) scale(0.1 -0.1)\">\n",
       "       <defs>\n",
       "        <path id=\"DejaVuSans-34\" d=\"M 2419 4116 \n",
       "L 825 1625 \n",
       "L 2419 1625 \n",
       "L 2419 4116 \n",
       "z\n",
       "M 2253 4666 \n",
       "L 3047 4666 \n",
       "L 3047 1625 \n",
       "L 3713 1625 \n",
       "L 3713 1100 \n",
       "L 3047 1100 \n",
       "L 3047 0 \n",
       "L 2419 0 \n",
       "L 2419 1100 \n",
       "L 313 1100 \n",
       "L 313 1709 \n",
       "L 2253 4666 \n",
       "z\n",
       "\" transform=\"scale(0.015625)\"/>\n",
       "       </defs>\n",
       "       <use xlink:href=\"#DejaVuSans-34\"/>\n",
       "       <use xlink:href=\"#DejaVuSans-30\" x=\"63.623047\"/>\n",
       "       <use xlink:href=\"#DejaVuSans-30\" x=\"127.246094\"/>\n",
       "      </g>\n",
       "     </g>\n",
       "    </g>\n",
       "    <g id=\"xtick_3\">\n",
       "     <g id=\"line2d_3\">\n",
       "      <g>\n",
       "       <use xlink:href=\"#md58b676ff6\" x=\"160.453977\" y=\"244.078125\" style=\"stroke: #000000; stroke-width: 0.8\"/>\n",
       "      </g>\n",
       "     </g>\n",
       "     <g id=\"text_3\">\n",
       "      <!-- 600 -->\n",
       "      <g transform=\"translate(150.910227 258.676562) scale(0.1 -0.1)\">\n",
       "       <defs>\n",
       "        <path id=\"DejaVuSans-36\" d=\"M 2113 2584 \n",
       "Q 1688 2584 1439 2293 \n",
       "Q 1191 2003 1191 1497 \n",
       "Q 1191 994 1439 701 \n",
       "Q 1688 409 2113 409 \n",
       "Q 2538 409 2786 701 \n",
       "Q 3034 994 3034 1497 \n",
       "Q 3034 2003 2786 2293 \n",
       "Q 2538 2584 2113 2584 \n",
       "z\n",
       "M 3366 4563 \n",
       "L 3366 3988 \n",
       "Q 3128 4100 2886 4159 \n",
       "Q 2644 4219 2406 4219 \n",
       "Q 1781 4219 1451 3797 \n",
       "Q 1122 3375 1075 2522 \n",
       "Q 1259 2794 1537 2939 \n",
       "Q 1816 3084 2150 3084 \n",
       "Q 2853 3084 3261 2657 \n",
       "Q 3669 2231 3669 1497 \n",
       "Q 3669 778 3244 343 \n",
       "Q 2819 -91 2113 -91 \n",
       "Q 1303 -91 875 529 \n",
       "Q 447 1150 447 2328 \n",
       "Q 447 3434 972 4092 \n",
       "Q 1497 4750 2381 4750 \n",
       "Q 2619 4750 2861 4703 \n",
       "Q 3103 4656 3366 4563 \n",
       "z\n",
       "\" transform=\"scale(0.015625)\"/>\n",
       "       </defs>\n",
       "       <use xlink:href=\"#DejaVuSans-36\"/>\n",
       "       <use xlink:href=\"#DejaVuSans-30\" x=\"63.623047\"/>\n",
       "       <use xlink:href=\"#DejaVuSans-30\" x=\"127.246094\"/>\n",
       "      </g>\n",
       "     </g>\n",
       "    </g>\n",
       "    <g id=\"xtick_4\">\n",
       "     <g id=\"line2d_4\">\n",
       "      <g>\n",
       "       <use xlink:href=\"#md58b676ff6\" x=\"201.035795\" y=\"244.078125\" style=\"stroke: #000000; stroke-width: 0.8\"/>\n",
       "      </g>\n",
       "     </g>\n",
       "     <g id=\"text_4\">\n",
       "      <!-- 800 -->\n",
       "      <g transform=\"translate(191.492045 258.676562) scale(0.1 -0.1)\">\n",
       "       <defs>\n",
       "        <path id=\"DejaVuSans-38\" d=\"M 2034 2216 \n",
       "Q 1584 2216 1326 1975 \n",
       "Q 1069 1734 1069 1313 \n",
       "Q 1069 891 1326 650 \n",
       "Q 1584 409 2034 409 \n",
       "Q 2484 409 2743 651 \n",
       "Q 3003 894 3003 1313 \n",
       "Q 3003 1734 2745 1975 \n",
       "Q 2488 2216 2034 2216 \n",
       "z\n",
       "M 1403 2484 \n",
       "Q 997 2584 770 2862 \n",
       "Q 544 3141 544 3541 \n",
       "Q 544 4100 942 4425 \n",
       "Q 1341 4750 2034 4750 \n",
       "Q 2731 4750 3128 4425 \n",
       "Q 3525 4100 3525 3541 \n",
       "Q 3525 3141 3298 2862 \n",
       "Q 3072 2584 2669 2484 \n",
       "Q 3125 2378 3379 2068 \n",
       "Q 3634 1759 3634 1313 \n",
       "Q 3634 634 3220 271 \n",
       "Q 2806 -91 2034 -91 \n",
       "Q 1263 -91 848 271 \n",
       "Q 434 634 434 1313 \n",
       "Q 434 1759 690 2068 \n",
       "Q 947 2378 1403 2484 \n",
       "z\n",
       "M 1172 3481 \n",
       "Q 1172 3119 1398 2916 \n",
       "Q 1625 2713 2034 2713 \n",
       "Q 2441 2713 2670 2916 \n",
       "Q 2900 3119 2900 3481 \n",
       "Q 2900 3844 2670 4047 \n",
       "Q 2441 4250 2034 4250 \n",
       "Q 1625 4250 1398 4047 \n",
       "Q 1172 3844 1172 3481 \n",
       "z\n",
       "\" transform=\"scale(0.015625)\"/>\n",
       "       </defs>\n",
       "       <use xlink:href=\"#DejaVuSans-38\"/>\n",
       "       <use xlink:href=\"#DejaVuSans-30\" x=\"63.623047\"/>\n",
       "       <use xlink:href=\"#DejaVuSans-30\" x=\"127.246094\"/>\n",
       "      </g>\n",
       "     </g>\n",
       "    </g>\n",
       "    <g id=\"xtick_5\">\n",
       "     <g id=\"line2d_5\">\n",
       "      <g>\n",
       "       <use xlink:href=\"#md58b676ff6\" x=\"241.617614\" y=\"244.078125\" style=\"stroke: #000000; stroke-width: 0.8\"/>\n",
       "      </g>\n",
       "     </g>\n",
       "     <g id=\"text_5\">\n",
       "      <!-- 1000 -->\n",
       "      <g transform=\"translate(228.892614 258.676562) scale(0.1 -0.1)\">\n",
       "       <defs>\n",
       "        <path id=\"DejaVuSans-31\" d=\"M 794 531 \n",
       "L 1825 531 \n",
       "L 1825 4091 \n",
       "L 703 3866 \n",
       "L 703 4441 \n",
       "L 1819 4666 \n",
       "L 2450 4666 \n",
       "L 2450 531 \n",
       "L 3481 531 \n",
       "L 3481 0 \n",
       "L 794 0 \n",
       "L 794 531 \n",
       "z\n",
       "\" transform=\"scale(0.015625)\"/>\n",
       "       </defs>\n",
       "       <use xlink:href=\"#DejaVuSans-31\"/>\n",
       "       <use xlink:href=\"#DejaVuSans-30\" x=\"63.623047\"/>\n",
       "       <use xlink:href=\"#DejaVuSans-30\" x=\"127.246094\"/>\n",
       "       <use xlink:href=\"#DejaVuSans-30\" x=\"190.869141\"/>\n",
       "      </g>\n",
       "     </g>\n",
       "    </g>\n",
       "    <g id=\"xtick_6\">\n",
       "     <g id=\"line2d_6\">\n",
       "      <g>\n",
       "       <use xlink:href=\"#md58b676ff6\" x=\"282.199432\" y=\"244.078125\" style=\"stroke: #000000; stroke-width: 0.8\"/>\n",
       "      </g>\n",
       "     </g>\n",
       "     <g id=\"text_6\">\n",
       "      <!-- 1200 -->\n",
       "      <g transform=\"translate(269.474432 258.676562) scale(0.1 -0.1)\">\n",
       "       <use xlink:href=\"#DejaVuSans-31\"/>\n",
       "       <use xlink:href=\"#DejaVuSans-32\" x=\"63.623047\"/>\n",
       "       <use xlink:href=\"#DejaVuSans-30\" x=\"127.246094\"/>\n",
       "       <use xlink:href=\"#DejaVuSans-30\" x=\"190.869141\"/>\n",
       "      </g>\n",
       "     </g>\n",
       "    </g>\n",
       "    <g id=\"xtick_7\">\n",
       "     <g id=\"line2d_7\">\n",
       "      <g>\n",
       "       <use xlink:href=\"#md58b676ff6\" x=\"322.78125\" y=\"244.078125\" style=\"stroke: #000000; stroke-width: 0.8\"/>\n",
       "      </g>\n",
       "     </g>\n",
       "     <g id=\"text_7\">\n",
       "      <!-- 1400 -->\n",
       "      <g transform=\"translate(310.05625 258.676562) scale(0.1 -0.1)\">\n",
       "       <use xlink:href=\"#DejaVuSans-31\"/>\n",
       "       <use xlink:href=\"#DejaVuSans-34\" x=\"63.623047\"/>\n",
       "       <use xlink:href=\"#DejaVuSans-30\" x=\"127.246094\"/>\n",
       "       <use xlink:href=\"#DejaVuSans-30\" x=\"190.869141\"/>\n",
       "      </g>\n",
       "     </g>\n",
       "    </g>\n",
       "    <g id=\"xtick_8\">\n",
       "     <g id=\"line2d_8\">\n",
       "      <g>\n",
       "       <use xlink:href=\"#md58b676ff6\" x=\"363.363068\" y=\"244.078125\" style=\"stroke: #000000; stroke-width: 0.8\"/>\n",
       "      </g>\n",
       "     </g>\n",
       "     <g id=\"text_8\">\n",
       "      <!-- 1600 -->\n",
       "      <g transform=\"translate(350.638068 258.676562) scale(0.1 -0.1)\">\n",
       "       <use xlink:href=\"#DejaVuSans-31\"/>\n",
       "       <use xlink:href=\"#DejaVuSans-36\" x=\"63.623047\"/>\n",
       "       <use xlink:href=\"#DejaVuSans-30\" x=\"127.246094\"/>\n",
       "       <use xlink:href=\"#DejaVuSans-30\" x=\"190.869141\"/>\n",
       "      </g>\n",
       "     </g>\n",
       "    </g>\n",
       "    <g id=\"text_9\">\n",
       "     <!-- step -->\n",
       "     <g transform=\"translate(200.365625 272.354687) scale(0.1 -0.1)\">\n",
       "      <defs>\n",
       "       <path id=\"DejaVuSans-73\" d=\"M 2834 3397 \n",
       "L 2834 2853 \n",
       "Q 2591 2978 2328 3040 \n",
       "Q 2066 3103 1784 3103 \n",
       "Q 1356 3103 1142 2972 \n",
       "Q 928 2841 928 2578 \n",
       "Q 928 2378 1081 2264 \n",
       "Q 1234 2150 1697 2047 \n",
       "L 1894 2003 \n",
       "Q 2506 1872 2764 1633 \n",
       "Q 3022 1394 3022 966 \n",
       "Q 3022 478 2636 193 \n",
       "Q 2250 -91 1575 -91 \n",
       "Q 1294 -91 989 -36 \n",
       "Q 684 19 347 128 \n",
       "L 347 722 \n",
       "Q 666 556 975 473 \n",
       "Q 1284 391 1588 391 \n",
       "Q 1994 391 2212 530 \n",
       "Q 2431 669 2431 922 \n",
       "Q 2431 1156 2273 1281 \n",
       "Q 2116 1406 1581 1522 \n",
       "L 1381 1569 \n",
       "Q 847 1681 609 1914 \n",
       "Q 372 2147 372 2553 \n",
       "Q 372 3047 722 3315 \n",
       "Q 1072 3584 1716 3584 \n",
       "Q 2034 3584 2315 3537 \n",
       "Q 2597 3491 2834 3397 \n",
       "z\n",
       "\" transform=\"scale(0.015625)\"/>\n",
       "       <path id=\"DejaVuSans-74\" d=\"M 1172 4494 \n",
       "L 1172 3500 \n",
       "L 2356 3500 \n",
       "L 2356 3053 \n",
       "L 1172 3053 \n",
       "L 1172 1153 \n",
       "Q 1172 725 1289 603 \n",
       "Q 1406 481 1766 481 \n",
       "L 2356 481 \n",
       "L 2356 0 \n",
       "L 1766 0 \n",
       "Q 1100 0 847 248 \n",
       "Q 594 497 594 1153 \n",
       "L 594 3053 \n",
       "L 172 3053 \n",
       "L 172 3500 \n",
       "L 594 3500 \n",
       "L 594 4494 \n",
       "L 1172 4494 \n",
       "z\n",
       "\" transform=\"scale(0.015625)\"/>\n",
       "       <path id=\"DejaVuSans-65\" d=\"M 3597 1894 \n",
       "L 3597 1613 \n",
       "L 953 1613 \n",
       "Q 991 1019 1311 708 \n",
       "Q 1631 397 2203 397 \n",
       "Q 2534 397 2845 478 \n",
       "Q 3156 559 3463 722 \n",
       "L 3463 178 \n",
       "Q 3153 47 2828 -22 \n",
       "Q 2503 -91 2169 -91 \n",
       "Q 1331 -91 842 396 \n",
       "Q 353 884 353 1716 \n",
       "Q 353 2575 817 3079 \n",
       "Q 1281 3584 2069 3584 \n",
       "Q 2775 3584 3186 3129 \n",
       "Q 3597 2675 3597 1894 \n",
       "z\n",
       "M 3022 2063 \n",
       "Q 3016 2534 2758 2815 \n",
       "Q 2500 3097 2075 3097 \n",
       "Q 1594 3097 1305 2825 \n",
       "Q 1016 2553 972 2059 \n",
       "L 3022 2063 \n",
       "z\n",
       "\" transform=\"scale(0.015625)\"/>\n",
       "       <path id=\"DejaVuSans-70\" d=\"M 1159 525 \n",
       "L 1159 -1331 \n",
       "L 581 -1331 \n",
       "L 581 3500 \n",
       "L 1159 3500 \n",
       "L 1159 2969 \n",
       "Q 1341 3281 1617 3432 \n",
       "Q 1894 3584 2278 3584 \n",
       "Q 2916 3584 3314 3078 \n",
       "Q 3713 2572 3713 1747 \n",
       "Q 3713 922 3314 415 \n",
       "Q 2916 -91 2278 -91 \n",
       "Q 1894 -91 1617 61 \n",
       "Q 1341 213 1159 525 \n",
       "z\n",
       "M 3116 1747 \n",
       "Q 3116 2381 2855 2742 \n",
       "Q 2594 3103 2138 3103 \n",
       "Q 1681 3103 1420 2742 \n",
       "Q 1159 2381 1159 1747 \n",
       "Q 1159 1113 1420 752 \n",
       "Q 1681 391 2138 391 \n",
       "Q 2594 391 2855 752 \n",
       "Q 3116 1113 3116 1747 \n",
       "z\n",
       "\" transform=\"scale(0.015625)\"/>\n",
       "      </defs>\n",
       "      <use xlink:href=\"#DejaVuSans-73\"/>\n",
       "      <use xlink:href=\"#DejaVuSans-74\" x=\"52.099609\"/>\n",
       "      <use xlink:href=\"#DejaVuSans-65\" x=\"91.308594\"/>\n",
       "      <use xlink:href=\"#DejaVuSans-70\" x=\"152.832031\"/>\n",
       "     </g>\n",
       "    </g>\n",
       "   </g>\n",
       "   <g id=\"matplotlib.axis_2\">\n",
       "    <g id=\"ytick_1\">\n",
       "     <g id=\"line2d_9\">\n",
       "      <defs>\n",
       "       <path id=\"mea6a3e5c35\" d=\"M 0 0 \n",
       "L -3.5 0 \n",
       "\" style=\"stroke: #000000; stroke-width: 0.8\"/>\n",
       "      </defs>\n",
       "      <g>\n",
       "       <use xlink:href=\"#mea6a3e5c35\" x=\"43.78125\" y=\"235.789631\" style=\"stroke: #000000; stroke-width: 0.8\"/>\n",
       "      </g>\n",
       "     </g>\n",
       "     <g id=\"text_10\">\n",
       "      <!-- 0.0 -->\n",
       "      <g transform=\"translate(20.878125 239.58885) scale(0.1 -0.1)\">\n",
       "       <defs>\n",
       "        <path id=\"DejaVuSans-2e\" d=\"M 684 794 \n",
       "L 1344 794 \n",
       "L 1344 0 \n",
       "L 684 0 \n",
       "L 684 794 \n",
       "z\n",
       "\" transform=\"scale(0.015625)\"/>\n",
       "       </defs>\n",
       "       <use xlink:href=\"#DejaVuSans-30\"/>\n",
       "       <use xlink:href=\"#DejaVuSans-2e\" x=\"63.623047\"/>\n",
       "       <use xlink:href=\"#DejaVuSans-30\" x=\"95.410156\"/>\n",
       "      </g>\n",
       "     </g>\n",
       "    </g>\n",
       "    <g id=\"ytick_2\">\n",
       "     <g id=\"line2d_10\">\n",
       "      <g>\n",
       "       <use xlink:href=\"#mea6a3e5c35\" x=\"43.78125\" y=\"211.079206\" style=\"stroke: #000000; stroke-width: 0.8\"/>\n",
       "      </g>\n",
       "     </g>\n",
       "     <g id=\"text_11\">\n",
       "      <!-- 0.2 -->\n",
       "      <g transform=\"translate(20.878125 214.878425) scale(0.1 -0.1)\">\n",
       "       <use xlink:href=\"#DejaVuSans-30\"/>\n",
       "       <use xlink:href=\"#DejaVuSans-2e\" x=\"63.623047\"/>\n",
       "       <use xlink:href=\"#DejaVuSans-32\" x=\"95.410156\"/>\n",
       "      </g>\n",
       "     </g>\n",
       "    </g>\n",
       "    <g id=\"ytick_3\">\n",
       "     <g id=\"line2d_11\">\n",
       "      <g>\n",
       "       <use xlink:href=\"#mea6a3e5c35\" x=\"43.78125\" y=\"186.368781\" style=\"stroke: #000000; stroke-width: 0.8\"/>\n",
       "      </g>\n",
       "     </g>\n",
       "     <g id=\"text_12\">\n",
       "      <!-- 0.4 -->\n",
       "      <g transform=\"translate(20.878125 190.168) scale(0.1 -0.1)\">\n",
       "       <use xlink:href=\"#DejaVuSans-30\"/>\n",
       "       <use xlink:href=\"#DejaVuSans-2e\" x=\"63.623047\"/>\n",
       "       <use xlink:href=\"#DejaVuSans-34\" x=\"95.410156\"/>\n",
       "      </g>\n",
       "     </g>\n",
       "    </g>\n",
       "    <g id=\"ytick_4\">\n",
       "     <g id=\"line2d_12\">\n",
       "      <g>\n",
       "       <use xlink:href=\"#mea6a3e5c35\" x=\"43.78125\" y=\"161.658357\" style=\"stroke: #000000; stroke-width: 0.8\"/>\n",
       "      </g>\n",
       "     </g>\n",
       "     <g id=\"text_13\">\n",
       "      <!-- 0.6 -->\n",
       "      <g transform=\"translate(20.878125 165.457575) scale(0.1 -0.1)\">\n",
       "       <use xlink:href=\"#DejaVuSans-30\"/>\n",
       "       <use xlink:href=\"#DejaVuSans-2e\" x=\"63.623047\"/>\n",
       "       <use xlink:href=\"#DejaVuSans-36\" x=\"95.410156\"/>\n",
       "      </g>\n",
       "     </g>\n",
       "    </g>\n",
       "    <g id=\"ytick_5\">\n",
       "     <g id=\"line2d_13\">\n",
       "      <g>\n",
       "       <use xlink:href=\"#mea6a3e5c35\" x=\"43.78125\" y=\"136.947932\" style=\"stroke: #000000; stroke-width: 0.8\"/>\n",
       "      </g>\n",
       "     </g>\n",
       "     <g id=\"text_14\">\n",
       "      <!-- 0.8 -->\n",
       "      <g transform=\"translate(20.878125 140.747151) scale(0.1 -0.1)\">\n",
       "       <use xlink:href=\"#DejaVuSans-30\"/>\n",
       "       <use xlink:href=\"#DejaVuSans-2e\" x=\"63.623047\"/>\n",
       "       <use xlink:href=\"#DejaVuSans-38\" x=\"95.410156\"/>\n",
       "      </g>\n",
       "     </g>\n",
       "    </g>\n",
       "    <g id=\"ytick_6\">\n",
       "     <g id=\"line2d_14\">\n",
       "      <g>\n",
       "       <use xlink:href=\"#mea6a3e5c35\" x=\"43.78125\" y=\"112.237507\" style=\"stroke: #000000; stroke-width: 0.8\"/>\n",
       "      </g>\n",
       "     </g>\n",
       "     <g id=\"text_15\">\n",
       "      <!-- 1.0 -->\n",
       "      <g transform=\"translate(20.878125 116.036726) scale(0.1 -0.1)\">\n",
       "       <use xlink:href=\"#DejaVuSans-31\"/>\n",
       "       <use xlink:href=\"#DejaVuSans-2e\" x=\"63.623047\"/>\n",
       "       <use xlink:href=\"#DejaVuSans-30\" x=\"95.410156\"/>\n",
       "      </g>\n",
       "     </g>\n",
       "    </g>\n",
       "    <g id=\"ytick_7\">\n",
       "     <g id=\"line2d_15\">\n",
       "      <g>\n",
       "       <use xlink:href=\"#mea6a3e5c35\" x=\"43.78125\" y=\"87.527083\" style=\"stroke: #000000; stroke-width: 0.8\"/>\n",
       "      </g>\n",
       "     </g>\n",
       "     <g id=\"text_16\">\n",
       "      <!-- 1.2 -->\n",
       "      <g transform=\"translate(20.878125 91.326301) scale(0.1 -0.1)\">\n",
       "       <use xlink:href=\"#DejaVuSans-31\"/>\n",
       "       <use xlink:href=\"#DejaVuSans-2e\" x=\"63.623047\"/>\n",
       "       <use xlink:href=\"#DejaVuSans-32\" x=\"95.410156\"/>\n",
       "      </g>\n",
       "     </g>\n",
       "    </g>\n",
       "    <g id=\"ytick_8\">\n",
       "     <g id=\"line2d_16\">\n",
       "      <g>\n",
       "       <use xlink:href=\"#mea6a3e5c35\" x=\"43.78125\" y=\"62.816658\" style=\"stroke: #000000; stroke-width: 0.8\"/>\n",
       "      </g>\n",
       "     </g>\n",
       "     <g id=\"text_17\">\n",
       "      <!-- 1.4 -->\n",
       "      <g transform=\"translate(20.878125 66.615877) scale(0.1 -0.1)\">\n",
       "       <use xlink:href=\"#DejaVuSans-31\"/>\n",
       "       <use xlink:href=\"#DejaVuSans-2e\" x=\"63.623047\"/>\n",
       "       <use xlink:href=\"#DejaVuSans-34\" x=\"95.410156\"/>\n",
       "      </g>\n",
       "     </g>\n",
       "    </g>\n",
       "    <g id=\"ytick_9\">\n",
       "     <g id=\"line2d_17\">\n",
       "      <g>\n",
       "       <use xlink:href=\"#mea6a3e5c35\" x=\"43.78125\" y=\"38.106233\" style=\"stroke: #000000; stroke-width: 0.8\"/>\n",
       "      </g>\n",
       "     </g>\n",
       "     <g id=\"text_18\">\n",
       "      <!-- 1.6 -->\n",
       "      <g transform=\"translate(20.878125 41.905452) scale(0.1 -0.1)\">\n",
       "       <use xlink:href=\"#DejaVuSans-31\"/>\n",
       "       <use xlink:href=\"#DejaVuSans-2e\" x=\"63.623047\"/>\n",
       "       <use xlink:href=\"#DejaVuSans-36\" x=\"95.410156\"/>\n",
       "      </g>\n",
       "     </g>\n",
       "    </g>\n",
       "    <g id=\"text_19\">\n",
       "     <!-- loss -->\n",
       "     <g transform=\"translate(14.798438 142.855937) rotate(-90) scale(0.1 -0.1)\">\n",
       "      <defs>\n",
       "       <path id=\"DejaVuSans-6c\" d=\"M 603 4863 \n",
       "L 1178 4863 \n",
       "L 1178 0 \n",
       "L 603 0 \n",
       "L 603 4863 \n",
       "z\n",
       "\" transform=\"scale(0.015625)\"/>\n",
       "       <path id=\"DejaVuSans-6f\" d=\"M 1959 3097 \n",
       "Q 1497 3097 1228 2736 \n",
       "Q 959 2375 959 1747 \n",
       "Q 959 1119 1226 758 \n",
       "Q 1494 397 1959 397 \n",
       "Q 2419 397 2687 759 \n",
       "Q 2956 1122 2956 1747 \n",
       "Q 2956 2369 2687 2733 \n",
       "Q 2419 3097 1959 3097 \n",
       "z\n",
       "M 1959 3584 \n",
       "Q 2709 3584 3137 3096 \n",
       "Q 3566 2609 3566 1747 \n",
       "Q 3566 888 3137 398 \n",
       "Q 2709 -91 1959 -91 \n",
       "Q 1206 -91 779 398 \n",
       "Q 353 888 353 1747 \n",
       "Q 353 2609 779 3096 \n",
       "Q 1206 3584 1959 3584 \n",
       "z\n",
       "\" transform=\"scale(0.015625)\"/>\n",
       "      </defs>\n",
       "      <use xlink:href=\"#DejaVuSans-6c\"/>\n",
       "      <use xlink:href=\"#DejaVuSans-6f\" x=\"27.783203\"/>\n",
       "      <use xlink:href=\"#DejaVuSans-73\" x=\"88.964844\"/>\n",
       "      <use xlink:href=\"#DejaVuSans-73\" x=\"141.064453\"/>\n",
       "     </g>\n",
       "    </g>\n",
       "   </g>\n",
       "   <g id=\"line2d_18\">\n",
       "    <path d=\"M 58.999432 32.398125 \n",
       "L 79.290341 166.180364 \n",
       "L 99.58125 203.937893 \n",
       "L 119.872159 216.910866 \n",
       "L 140.163068 223.459129 \n",
       "L 160.453977 227.202758 \n",
       "L 180.744886 229.574959 \n",
       "L 201.035795 231.168781 \n",
       "L 221.326705 232.008936 \n",
       "L 241.617614 232.799669 \n",
       "L 261.908523 232.984998 \n",
       "L 282.199432 233.652179 \n",
       "L 302.490341 233.825152 \n",
       "L 322.78125 233.923994 \n",
       "L 343.072159 233.862218 \n",
       "L 363.363068 233.998125 \n",
       "\" style=\"fill: none; stroke-dasharray: 5.55,2.4; stroke-dashoffset: 0; stroke: #0000ff; stroke-width: 1.5\"/>\n",
       "    <defs>\n",
       "     <path id=\"maf7c54a764\" d=\"M 0 3 \n",
       "C 0.795609 3 1.55874 2.683901 2.12132 2.12132 \n",
       "C 2.683901 1.55874 3 0.795609 3 0 \n",
       "C 3 -0.795609 2.683901 -1.55874 2.12132 -2.12132 \n",
       "C 1.55874 -2.683901 0.795609 -3 0 -3 \n",
       "C -0.795609 -3 -1.55874 -2.683901 -2.12132 -2.12132 \n",
       "C -2.683901 -1.55874 -3 -0.795609 -3 0 \n",
       "C -3 0.795609 -2.683901 1.55874 -2.12132 2.12132 \n",
       "C -1.55874 2.683901 -0.795609 3 0 3 \n",
       "z\n",
       "\" style=\"stroke: #0000ff\"/>\n",
       "    </defs>\n",
       "    <g>\n",
       "     <use xlink:href=\"#maf7c54a764\" x=\"58.999432\" y=\"32.398125\" style=\"fill: #0000ff; stroke: #0000ff\"/>\n",
       "     <use xlink:href=\"#maf7c54a764\" x=\"79.290341\" y=\"166.180364\" style=\"fill: #0000ff; stroke: #0000ff\"/>\n",
       "     <use xlink:href=\"#maf7c54a764\" x=\"99.58125\" y=\"203.937893\" style=\"fill: #0000ff; stroke: #0000ff\"/>\n",
       "     <use xlink:href=\"#maf7c54a764\" x=\"119.872159\" y=\"216.910866\" style=\"fill: #0000ff; stroke: #0000ff\"/>\n",
       "     <use xlink:href=\"#maf7c54a764\" x=\"140.163068\" y=\"223.459129\" style=\"fill: #0000ff; stroke: #0000ff\"/>\n",
       "     <use xlink:href=\"#maf7c54a764\" x=\"160.453977\" y=\"227.202758\" style=\"fill: #0000ff; stroke: #0000ff\"/>\n",
       "     <use xlink:href=\"#maf7c54a764\" x=\"180.744886\" y=\"229.574959\" style=\"fill: #0000ff; stroke: #0000ff\"/>\n",
       "     <use xlink:href=\"#maf7c54a764\" x=\"201.035795\" y=\"231.168781\" style=\"fill: #0000ff; stroke: #0000ff\"/>\n",
       "     <use xlink:href=\"#maf7c54a764\" x=\"221.326705\" y=\"232.008936\" style=\"fill: #0000ff; stroke: #0000ff\"/>\n",
       "     <use xlink:href=\"#maf7c54a764\" x=\"241.617614\" y=\"232.799669\" style=\"fill: #0000ff; stroke: #0000ff\"/>\n",
       "     <use xlink:href=\"#maf7c54a764\" x=\"261.908523\" y=\"232.984998\" style=\"fill: #0000ff; stroke: #0000ff\"/>\n",
       "     <use xlink:href=\"#maf7c54a764\" x=\"282.199432\" y=\"233.652179\" style=\"fill: #0000ff; stroke: #0000ff\"/>\n",
       "     <use xlink:href=\"#maf7c54a764\" x=\"302.490341\" y=\"233.825152\" style=\"fill: #0000ff; stroke: #0000ff\"/>\n",
       "     <use xlink:href=\"#maf7c54a764\" x=\"322.78125\" y=\"233.923994\" style=\"fill: #0000ff; stroke: #0000ff\"/>\n",
       "     <use xlink:href=\"#maf7c54a764\" x=\"343.072159\" y=\"233.862218\" style=\"fill: #0000ff; stroke: #0000ff\"/>\n",
       "     <use xlink:href=\"#maf7c54a764\" x=\"363.363068\" y=\"233.998125\" style=\"fill: #0000ff; stroke: #0000ff\"/>\n",
       "    </g>\n",
       "   </g>\n",
       "   <g id=\"line2d_19\">\n",
       "    <path d=\"M 58.999432 139.500125 \n",
       "L 79.290341 194.201367 \n",
       "L 99.58125 204.149722 \n",
       "L 119.872159 209.068996 \n",
       "L 140.163068 212.646522 \n",
       "L 160.453977 213.156802 \n",
       "L 180.744886 214.842375 \n",
       "L 201.035795 212.165457 \n",
       "L 221.326705 213.203454 \n",
       "L 241.617614 211.692805 \n",
       "L 261.908523 212.978595 \n",
       "L 282.199432 212.067728 \n",
       "L 302.490341 212.113581 \n",
       "L 322.78125 211.877098 \n",
       "L 343.072159 211.998715 \n",
       "L 363.363068 212.535286 \n",
       "\" style=\"fill: none; stroke: #00bfbf; stroke-width: 1.5; stroke-linecap: square\"/>\n",
       "    <defs>\n",
       "     <path id=\"mf9675cd7aa\" d=\"M 0 3 \n",
       "C 0.795609 3 1.55874 2.683901 2.12132 2.12132 \n",
       "C 2.683901 1.55874 3 0.795609 3 0 \n",
       "C 3 -0.795609 2.683901 -1.55874 2.12132 -2.12132 \n",
       "C 1.55874 -2.683901 0.795609 -3 0 -3 \n",
       "C -0.795609 -3 -1.55874 -2.683901 -2.12132 -2.12132 \n",
       "C -2.683901 -1.55874 -3 -0.795609 -3 0 \n",
       "C -3 0.795609 -2.683901 1.55874 -2.12132 2.12132 \n",
       "C -1.55874 2.683901 -0.795609 3 0 3 \n",
       "z\n",
       "\" style=\"stroke: #00bfbf\"/>\n",
       "    </defs>\n",
       "    <g>\n",
       "     <use xlink:href=\"#mf9675cd7aa\" x=\"58.999432\" y=\"139.500125\" style=\"fill: #00bfbf; stroke: #00bfbf\"/>\n",
       "     <use xlink:href=\"#mf9675cd7aa\" x=\"79.290341\" y=\"194.201367\" style=\"fill: #00bfbf; stroke: #00bfbf\"/>\n",
       "     <use xlink:href=\"#mf9675cd7aa\" x=\"99.58125\" y=\"204.149722\" style=\"fill: #00bfbf; stroke: #00bfbf\"/>\n",
       "     <use xlink:href=\"#mf9675cd7aa\" x=\"119.872159\" y=\"209.068996\" style=\"fill: #00bfbf; stroke: #00bfbf\"/>\n",
       "     <use xlink:href=\"#mf9675cd7aa\" x=\"140.163068\" y=\"212.646522\" style=\"fill: #00bfbf; stroke: #00bfbf\"/>\n",
       "     <use xlink:href=\"#mf9675cd7aa\" x=\"160.453977\" y=\"213.156802\" style=\"fill: #00bfbf; stroke: #00bfbf\"/>\n",
       "     <use xlink:href=\"#mf9675cd7aa\" x=\"180.744886\" y=\"214.842375\" style=\"fill: #00bfbf; stroke: #00bfbf\"/>\n",
       "     <use xlink:href=\"#mf9675cd7aa\" x=\"201.035795\" y=\"212.165457\" style=\"fill: #00bfbf; stroke: #00bfbf\"/>\n",
       "     <use xlink:href=\"#mf9675cd7aa\" x=\"221.326705\" y=\"213.203454\" style=\"fill: #00bfbf; stroke: #00bfbf\"/>\n",
       "     <use xlink:href=\"#mf9675cd7aa\" x=\"241.617614\" y=\"211.692805\" style=\"fill: #00bfbf; stroke: #00bfbf\"/>\n",
       "     <use xlink:href=\"#mf9675cd7aa\" x=\"261.908523\" y=\"212.978595\" style=\"fill: #00bfbf; stroke: #00bfbf\"/>\n",
       "     <use xlink:href=\"#mf9675cd7aa\" x=\"282.199432\" y=\"212.067728\" style=\"fill: #00bfbf; stroke: #00bfbf\"/>\n",
       "     <use xlink:href=\"#mf9675cd7aa\" x=\"302.490341\" y=\"212.113581\" style=\"fill: #00bfbf; stroke: #00bfbf\"/>\n",
       "     <use xlink:href=\"#mf9675cd7aa\" x=\"322.78125\" y=\"211.877098\" style=\"fill: #00bfbf; stroke: #00bfbf\"/>\n",
       "     <use xlink:href=\"#mf9675cd7aa\" x=\"343.072159\" y=\"211.998715\" style=\"fill: #00bfbf; stroke: #00bfbf\"/>\n",
       "     <use xlink:href=\"#mf9675cd7aa\" x=\"363.363068\" y=\"212.535286\" style=\"fill: #00bfbf; stroke: #00bfbf\"/>\n",
       "    </g>\n",
       "   </g>\n",
       "   <g id=\"line2d_20\">\n",
       "    <defs>\n",
       "     <path id=\"m41c907e22c\" d=\"M 0 -7.5 \n",
       "L -1.683855 -2.317627 \n",
       "L -7.132924 -2.317627 \n",
       "L -2.724534 0.885255 \n",
       "L -4.408389 6.067627 \n",
       "L -0 2.864745 \n",
       "L 4.408389 6.067627 \n",
       "L 2.724534 0.885255 \n",
       "L 7.132924 -2.317627 \n",
       "L 1.683855 -2.317627 \n",
       "z\n",
       "\" style=\"stroke: #ff0000; stroke-linejoin: bevel\"/>\n",
       "    </defs>\n",
       "    <g>\n",
       "     <use xlink:href=\"#m41c907e22c\" x=\"180.744886\" y=\"214.842375\" style=\"fill: #ff0000; stroke: #ff0000; stroke-linejoin: bevel\"/>\n",
       "    </g>\n",
       "   </g>\n",
       "   <g id=\"patch_3\">\n",
       "    <path d=\"M 43.78125 244.078125 \n",
       "L 43.78125 22.318125 \n",
       "\" style=\"fill: none; stroke: #000000; stroke-width: 0.8; stroke-linejoin: miter; stroke-linecap: square\"/>\n",
       "   </g>\n",
       "   <g id=\"patch_4\">\n",
       "    <path d=\"M 378.58125 244.078125 \n",
       "L 378.58125 22.318125 \n",
       "\" style=\"fill: none; stroke: #000000; stroke-width: 0.8; stroke-linejoin: miter; stroke-linecap: square\"/>\n",
       "   </g>\n",
       "   <g id=\"patch_5\">\n",
       "    <path d=\"M 43.78125 244.078125 \n",
       "L 378.58125 244.078125 \n",
       "\" style=\"fill: none; stroke: #000000; stroke-width: 0.8; stroke-linejoin: miter; stroke-linecap: square\"/>\n",
       "   </g>\n",
       "   <g id=\"patch_6\">\n",
       "    <path d=\"M 43.78125 22.318125 \n",
       "L 378.58125 22.318125 \n",
       "\" style=\"fill: none; stroke: #000000; stroke-width: 0.8; stroke-linejoin: miter; stroke-linecap: square\"/>\n",
       "   </g>\n",
       "   <g id=\"text_20\">\n",
       "    <!-- best val_loss = 0.1695 (@step 700) -->\n",
       "    <g transform=\"translate(104.048438 16.318125) scale(0.12 -0.12)\">\n",
       "     <defs>\n",
       "      <path id=\"DejaVuSans-62\" d=\"M 3116 1747 \n",
       "Q 3116 2381 2855 2742 \n",
       "Q 2594 3103 2138 3103 \n",
       "Q 1681 3103 1420 2742 \n",
       "Q 1159 2381 1159 1747 \n",
       "Q 1159 1113 1420 752 \n",
       "Q 1681 391 2138 391 \n",
       "Q 2594 391 2855 752 \n",
       "Q 3116 1113 3116 1747 \n",
       "z\n",
       "M 1159 2969 \n",
       "Q 1341 3281 1617 3432 \n",
       "Q 1894 3584 2278 3584 \n",
       "Q 2916 3584 3314 3078 \n",
       "Q 3713 2572 3713 1747 \n",
       "Q 3713 922 3314 415 \n",
       "Q 2916 -91 2278 -91 \n",
       "Q 1894 -91 1617 61 \n",
       "Q 1341 213 1159 525 \n",
       "L 1159 0 \n",
       "L 581 0 \n",
       "L 581 4863 \n",
       "L 1159 4863 \n",
       "L 1159 2969 \n",
       "z\n",
       "\" transform=\"scale(0.015625)\"/>\n",
       "      <path id=\"DejaVuSans-20\" transform=\"scale(0.015625)\"/>\n",
       "      <path id=\"DejaVuSans-76\" d=\"M 191 3500 \n",
       "L 800 3500 \n",
       "L 1894 563 \n",
       "L 2988 3500 \n",
       "L 3597 3500 \n",
       "L 2284 0 \n",
       "L 1503 0 \n",
       "L 191 3500 \n",
       "z\n",
       "\" transform=\"scale(0.015625)\"/>\n",
       "      <path id=\"DejaVuSans-61\" d=\"M 2194 1759 \n",
       "Q 1497 1759 1228 1600 \n",
       "Q 959 1441 959 1056 \n",
       "Q 959 750 1161 570 \n",
       "Q 1363 391 1709 391 \n",
       "Q 2188 391 2477 730 \n",
       "Q 2766 1069 2766 1631 \n",
       "L 2766 1759 \n",
       "L 2194 1759 \n",
       "z\n",
       "M 3341 1997 \n",
       "L 3341 0 \n",
       "L 2766 0 \n",
       "L 2766 531 \n",
       "Q 2569 213 2275 61 \n",
       "Q 1981 -91 1556 -91 \n",
       "Q 1019 -91 701 211 \n",
       "Q 384 513 384 1019 \n",
       "Q 384 1609 779 1909 \n",
       "Q 1175 2209 1959 2209 \n",
       "L 2766 2209 \n",
       "L 2766 2266 \n",
       "Q 2766 2663 2505 2880 \n",
       "Q 2244 3097 1772 3097 \n",
       "Q 1472 3097 1187 3025 \n",
       "Q 903 2953 641 2809 \n",
       "L 641 3341 \n",
       "Q 956 3463 1253 3523 \n",
       "Q 1550 3584 1831 3584 \n",
       "Q 2591 3584 2966 3190 \n",
       "Q 3341 2797 3341 1997 \n",
       "z\n",
       "\" transform=\"scale(0.015625)\"/>\n",
       "      <path id=\"DejaVuSans-5f\" d=\"M 3263 -1063 \n",
       "L 3263 -1509 \n",
       "L -63 -1509 \n",
       "L -63 -1063 \n",
       "L 3263 -1063 \n",
       "z\n",
       "\" transform=\"scale(0.015625)\"/>\n",
       "      <path id=\"DejaVuSans-3d\" d=\"M 678 2906 \n",
       "L 4684 2906 \n",
       "L 4684 2381 \n",
       "L 678 2381 \n",
       "L 678 2906 \n",
       "z\n",
       "M 678 1631 \n",
       "L 4684 1631 \n",
       "L 4684 1100 \n",
       "L 678 1100 \n",
       "L 678 1631 \n",
       "z\n",
       "\" transform=\"scale(0.015625)\"/>\n",
       "      <path id=\"DejaVuSans-39\" d=\"M 703 97 \n",
       "L 703 672 \n",
       "Q 941 559 1184 500 \n",
       "Q 1428 441 1663 441 \n",
       "Q 2288 441 2617 861 \n",
       "Q 2947 1281 2994 2138 \n",
       "Q 2813 1869 2534 1725 \n",
       "Q 2256 1581 1919 1581 \n",
       "Q 1219 1581 811 2004 \n",
       "Q 403 2428 403 3163 \n",
       "Q 403 3881 828 4315 \n",
       "Q 1253 4750 1959 4750 \n",
       "Q 2769 4750 3195 4129 \n",
       "Q 3622 3509 3622 2328 \n",
       "Q 3622 1225 3098 567 \n",
       "Q 2575 -91 1691 -91 \n",
       "Q 1453 -91 1209 -44 \n",
       "Q 966 3 703 97 \n",
       "z\n",
       "M 1959 2075 \n",
       "Q 2384 2075 2632 2365 \n",
       "Q 2881 2656 2881 3163 \n",
       "Q 2881 3666 2632 3958 \n",
       "Q 2384 4250 1959 4250 \n",
       "Q 1534 4250 1286 3958 \n",
       "Q 1038 3666 1038 3163 \n",
       "Q 1038 2656 1286 2365 \n",
       "Q 1534 2075 1959 2075 \n",
       "z\n",
       "\" transform=\"scale(0.015625)\"/>\n",
       "      <path id=\"DejaVuSans-35\" d=\"M 691 4666 \n",
       "L 3169 4666 \n",
       "L 3169 4134 \n",
       "L 1269 4134 \n",
       "L 1269 2991 \n",
       "Q 1406 3038 1543 3061 \n",
       "Q 1681 3084 1819 3084 \n",
       "Q 2600 3084 3056 2656 \n",
       "Q 3513 2228 3513 1497 \n",
       "Q 3513 744 3044 326 \n",
       "Q 2575 -91 1722 -91 \n",
       "Q 1428 -91 1123 -41 \n",
       "Q 819 9 494 109 \n",
       "L 494 744 \n",
       "Q 775 591 1075 516 \n",
       "Q 1375 441 1709 441 \n",
       "Q 2250 441 2565 725 \n",
       "Q 2881 1009 2881 1497 \n",
       "Q 2881 1984 2565 2268 \n",
       "Q 2250 2553 1709 2553 \n",
       "Q 1456 2553 1204 2497 \n",
       "Q 953 2441 691 2322 \n",
       "L 691 4666 \n",
       "z\n",
       "\" transform=\"scale(0.015625)\"/>\n",
       "      <path id=\"DejaVuSans-28\" d=\"M 1984 4856 \n",
       "Q 1566 4138 1362 3434 \n",
       "Q 1159 2731 1159 2009 \n",
       "Q 1159 1288 1364 580 \n",
       "Q 1569 -128 1984 -844 \n",
       "L 1484 -844 \n",
       "Q 1016 -109 783 600 \n",
       "Q 550 1309 550 2009 \n",
       "Q 550 2706 781 3412 \n",
       "Q 1013 4119 1484 4856 \n",
       "L 1984 4856 \n",
       "z\n",
       "\" transform=\"scale(0.015625)\"/>\n",
       "      <path id=\"DejaVuSans-40\" d=\"M 2381 1678 \n",
       "Q 2381 1231 2603 976 \n",
       "Q 2825 722 3213 722 \n",
       "Q 3597 722 3817 978 \n",
       "Q 4038 1234 4038 1678 \n",
       "Q 4038 2116 3813 2373 \n",
       "Q 3588 2631 3206 2631 \n",
       "Q 2828 2631 2604 2375 \n",
       "Q 2381 2119 2381 1678 \n",
       "z\n",
       "M 4084 744 \n",
       "Q 3897 503 3655 389 \n",
       "Q 3413 275 3091 275 \n",
       "Q 2553 275 2217 664 \n",
       "Q 1881 1053 1881 1678 \n",
       "Q 1881 2303 2218 2693 \n",
       "Q 2556 3084 3091 3084 \n",
       "Q 3413 3084 3656 2967 \n",
       "Q 3900 2850 4084 2613 \n",
       "L 4084 3022 \n",
       "L 4531 3022 \n",
       "L 4531 722 \n",
       "Q 4988 791 5245 1139 \n",
       "Q 5503 1488 5503 2041 \n",
       "Q 5503 2375 5404 2669 \n",
       "Q 5306 2963 5106 3213 \n",
       "Q 4781 3622 4314 3839 \n",
       "Q 3847 4056 3297 4056 \n",
       "Q 2913 4056 2559 3954 \n",
       "Q 2206 3853 1906 3653 \n",
       "Q 1416 3334 1139 2817 \n",
       "Q 863 2300 863 1697 \n",
       "Q 863 1200 1042 765 \n",
       "Q 1222 331 1563 0 \n",
       "Q 1891 -325 2322 -495 \n",
       "Q 2753 -666 3244 -666 \n",
       "Q 3647 -666 4036 -530 \n",
       "Q 4425 -394 4750 -141 \n",
       "L 5031 -488 \n",
       "Q 4641 -791 4180 -952 \n",
       "Q 3719 -1113 3244 -1113 \n",
       "Q 2666 -1113 2153 -908 \n",
       "Q 1641 -703 1241 -313 \n",
       "Q 841 78 631 592 \n",
       "Q 422 1106 422 1697 \n",
       "Q 422 2266 634 2781 \n",
       "Q 847 3297 1241 3688 \n",
       "Q 1644 4084 2172 4295 \n",
       "Q 2700 4506 3291 4506 \n",
       "Q 3953 4506 4520 4234 \n",
       "Q 5088 3963 5472 3463 \n",
       "Q 5706 3156 5829 2797 \n",
       "Q 5953 2438 5953 2053 \n",
       "Q 5953 1231 5456 756 \n",
       "Q 4959 281 4084 263 \n",
       "L 4084 744 \n",
       "z\n",
       "\" transform=\"scale(0.015625)\"/>\n",
       "      <path id=\"DejaVuSans-37\" d=\"M 525 4666 \n",
       "L 3525 4666 \n",
       "L 3525 4397 \n",
       "L 1831 0 \n",
       "L 1172 0 \n",
       "L 2766 4134 \n",
       "L 525 4134 \n",
       "L 525 4666 \n",
       "z\n",
       "\" transform=\"scale(0.015625)\"/>\n",
       "      <path id=\"DejaVuSans-29\" d=\"M 513 4856 \n",
       "L 1013 4856 \n",
       "Q 1481 4119 1714 3412 \n",
       "Q 1947 2706 1947 2009 \n",
       "Q 1947 1309 1714 600 \n",
       "Q 1481 -109 1013 -844 \n",
       "L 513 -844 \n",
       "Q 928 -128 1133 580 \n",
       "Q 1338 1288 1338 2009 \n",
       "Q 1338 2731 1133 3434 \n",
       "Q 928 4138 513 4856 \n",
       "z\n",
       "\" transform=\"scale(0.015625)\"/>\n",
       "     </defs>\n",
       "     <use xlink:href=\"#DejaVuSans-62\"/>\n",
       "     <use xlink:href=\"#DejaVuSans-65\" x=\"63.476562\"/>\n",
       "     <use xlink:href=\"#DejaVuSans-73\" x=\"125\"/>\n",
       "     <use xlink:href=\"#DejaVuSans-74\" x=\"177.099609\"/>\n",
       "     <use xlink:href=\"#DejaVuSans-20\" x=\"216.308594\"/>\n",
       "     <use xlink:href=\"#DejaVuSans-76\" x=\"248.095703\"/>\n",
       "     <use xlink:href=\"#DejaVuSans-61\" x=\"307.275391\"/>\n",
       "     <use xlink:href=\"#DejaVuSans-6c\" x=\"368.554688\"/>\n",
       "     <use xlink:href=\"#DejaVuSans-5f\" x=\"396.337891\"/>\n",
       "     <use xlink:href=\"#DejaVuSans-6c\" x=\"446.337891\"/>\n",
       "     <use xlink:href=\"#DejaVuSans-6f\" x=\"474.121094\"/>\n",
       "     <use xlink:href=\"#DejaVuSans-73\" x=\"535.302734\"/>\n",
       "     <use xlink:href=\"#DejaVuSans-73\" x=\"587.402344\"/>\n",
       "     <use xlink:href=\"#DejaVuSans-20\" x=\"639.501953\"/>\n",
       "     <use xlink:href=\"#DejaVuSans-3d\" x=\"671.289062\"/>\n",
       "     <use xlink:href=\"#DejaVuSans-20\" x=\"755.078125\"/>\n",
       "     <use xlink:href=\"#DejaVuSans-30\" x=\"786.865234\"/>\n",
       "     <use xlink:href=\"#DejaVuSans-2e\" x=\"850.488281\"/>\n",
       "     <use xlink:href=\"#DejaVuSans-31\" x=\"882.275391\"/>\n",
       "     <use xlink:href=\"#DejaVuSans-36\" x=\"945.898438\"/>\n",
       "     <use xlink:href=\"#DejaVuSans-39\" x=\"1009.521484\"/>\n",
       "     <use xlink:href=\"#DejaVuSans-35\" x=\"1073.144531\"/>\n",
       "     <use xlink:href=\"#DejaVuSans-20\" x=\"1136.767578\"/>\n",
       "     <use xlink:href=\"#DejaVuSans-28\" x=\"1168.554688\"/>\n",
       "     <use xlink:href=\"#DejaVuSans-40\" x=\"1207.568359\"/>\n",
       "     <use xlink:href=\"#DejaVuSans-73\" x=\"1307.568359\"/>\n",
       "     <use xlink:href=\"#DejaVuSans-74\" x=\"1359.667969\"/>\n",
       "     <use xlink:href=\"#DejaVuSans-65\" x=\"1398.876953\"/>\n",
       "     <use xlink:href=\"#DejaVuSans-70\" x=\"1460.400391\"/>\n",
       "     <use xlink:href=\"#DejaVuSans-20\" x=\"1523.876953\"/>\n",
       "     <use xlink:href=\"#DejaVuSans-37\" x=\"1555.664062\"/>\n",
       "     <use xlink:href=\"#DejaVuSans-30\" x=\"1619.287109\"/>\n",
       "     <use xlink:href=\"#DejaVuSans-30\" x=\"1682.910156\"/>\n",
       "     <use xlink:href=\"#DejaVuSans-29\" x=\"1746.533203\"/>\n",
       "    </g>\n",
       "   </g>\n",
       "   <g id=\"legend_1\">\n",
       "    <g id=\"patch_7\">\n",
       "     <path d=\"M 300.440625 59.9525 \n",
       "L 371.58125 59.9525 \n",
       "Q 373.58125 59.9525 373.58125 57.9525 \n",
       "L 373.58125 29.318125 \n",
       "Q 373.58125 27.318125 371.58125 27.318125 \n",
       "L 300.440625 27.318125 \n",
       "Q 298.440625 27.318125 298.440625 29.318125 \n",
       "L 298.440625 57.9525 \n",
       "Q 298.440625 59.9525 300.440625 59.9525 \n",
       "z\n",
       "\" style=\"fill: #ffffff; opacity: 0.8; stroke: #cccccc; stroke-linejoin: miter\"/>\n",
       "    </g>\n",
       "    <g id=\"line2d_21\">\n",
       "     <path d=\"M 302.440625 35.416562 \n",
       "L 312.440625 35.416562 \n",
       "L 322.440625 35.416562 \n",
       "\" style=\"fill: none; stroke-dasharray: 5.55,2.4; stroke-dashoffset: 0; stroke: #0000ff; stroke-width: 1.5\"/>\n",
       "     <g>\n",
       "      <use xlink:href=\"#maf7c54a764\" x=\"312.440625\" y=\"35.416562\" style=\"fill: #0000ff; stroke: #0000ff\"/>\n",
       "     </g>\n",
       "    </g>\n",
       "    <g id=\"text_21\">\n",
       "     <!-- loss -->\n",
       "     <g transform=\"translate(330.440625 38.916562) scale(0.1 -0.1)\">\n",
       "      <use xlink:href=\"#DejaVuSans-6c\"/>\n",
       "      <use xlink:href=\"#DejaVuSans-6f\" x=\"27.783203\"/>\n",
       "      <use xlink:href=\"#DejaVuSans-73\" x=\"88.964844\"/>\n",
       "      <use xlink:href=\"#DejaVuSans-73\" x=\"141.064453\"/>\n",
       "     </g>\n",
       "    </g>\n",
       "    <g id=\"line2d_22\">\n",
       "     <path d=\"M 302.440625 50.094687 \n",
       "L 312.440625 50.094687 \n",
       "L 322.440625 50.094687 \n",
       "\" style=\"fill: none; stroke: #00bfbf; stroke-width: 1.5; stroke-linecap: square\"/>\n",
       "     <g>\n",
       "      <use xlink:href=\"#mf9675cd7aa\" x=\"312.440625\" y=\"50.094687\" style=\"fill: #00bfbf; stroke: #00bfbf\"/>\n",
       "     </g>\n",
       "    </g>\n",
       "    <g id=\"text_22\">\n",
       "     <!-- val_loss -->\n",
       "     <g transform=\"translate(330.440625 53.594687) scale(0.1 -0.1)\">\n",
       "      <use xlink:href=\"#DejaVuSans-76\"/>\n",
       "      <use xlink:href=\"#DejaVuSans-61\" x=\"59.179688\"/>\n",
       "      <use xlink:href=\"#DejaVuSans-6c\" x=\"120.458984\"/>\n",
       "      <use xlink:href=\"#DejaVuSans-5f\" x=\"148.242188\"/>\n",
       "      <use xlink:href=\"#DejaVuSans-6c\" x=\"198.242188\"/>\n",
       "      <use xlink:href=\"#DejaVuSans-6f\" x=\"226.025391\"/>\n",
       "      <use xlink:href=\"#DejaVuSans-73\" x=\"287.207031\"/>\n",
       "      <use xlink:href=\"#DejaVuSans-73\" x=\"339.306641\"/>\n",
       "     </g>\n",
       "    </g>\n",
       "   </g>\n",
       "  </g>\n",
       " </g>\n",
       "</svg>\n"
      ],
      "text/plain": [
       "<Figure size 600x400 with 1 Axes>"
      ]
     },
     "metadata": {},
     "output_type": "display_data"
    },
    {
     "data": {
      "text/html": [
       "\n",
       "    <div>\n",
       "      \n",
       "      <progress value='1600' max='1600' style='width:300px; height:20px; vertical-align: middle;'></progress>\n",
       "      [1600/1600 01:06, Epoch 100/100]\n",
       "    </div>\n",
       "    <table border=\"1\" class=\"dataframe\">\n",
       "  <thead>\n",
       " <tr style=\"text-align: left;\">\n",
       "      <th>Step</th>\n",
       "      <th>Training Loss</th>\n",
       "      <th>Validation Loss</th>\n",
       "      <th>Acc</th>\n",
       "    </tr>\n",
       "  </thead>\n",
       "  <tbody>\n",
       "    <tr>\n",
       "      <td>100</td>\n",
       "      <td>1.646200</td>\n",
       "      <td>0.779343</td>\n",
       "      <td>0.796407</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <td>200</td>\n",
       "      <td>0.563400</td>\n",
       "      <td>0.336605</td>\n",
       "      <td>0.898204</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <td>300</td>\n",
       "      <td>0.257800</td>\n",
       "      <td>0.256086</td>\n",
       "      <td>0.916168</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <td>400</td>\n",
       "      <td>0.152800</td>\n",
       "      <td>0.216270</td>\n",
       "      <td>0.919162</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <td>500</td>\n",
       "      <td>0.099800</td>\n",
       "      <td>0.187315</td>\n",
       "      <td>0.937126</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <td>600</td>\n",
       "      <td>0.069500</td>\n",
       "      <td>0.183184</td>\n",
       "      <td>0.931138</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <td>700</td>\n",
       "      <td>0.050300</td>\n",
       "      <td>0.169542</td>\n",
       "      <td>0.937126</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <td>800</td>\n",
       "      <td>0.037400</td>\n",
       "      <td>0.191208</td>\n",
       "      <td>0.943114</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <td>900</td>\n",
       "      <td>0.030600</td>\n",
       "      <td>0.182807</td>\n",
       "      <td>0.949102</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <td>1000</td>\n",
       "      <td>0.024200</td>\n",
       "      <td>0.195034</td>\n",
       "      <td>0.946108</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <td>1100</td>\n",
       "      <td>0.022700</td>\n",
       "      <td>0.184627</td>\n",
       "      <td>0.940120</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <td>1200</td>\n",
       "      <td>0.017300</td>\n",
       "      <td>0.191999</td>\n",
       "      <td>0.940120</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <td>1300</td>\n",
       "      <td>0.015900</td>\n",
       "      <td>0.191628</td>\n",
       "      <td>0.943114</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <td>1400</td>\n",
       "      <td>0.015100</td>\n",
       "      <td>0.193542</td>\n",
       "      <td>0.937126</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <td>1500</td>\n",
       "      <td>0.015600</td>\n",
       "      <td>0.192558</td>\n",
       "      <td>0.943114</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <td>1600</td>\n",
       "      <td>0.014500</td>\n",
       "      <td>0.188215</td>\n",
       "      <td>0.946108</td>\n",
       "    </tr>\n",
       "  </tbody>\n",
       "</table><p>"
      ],
      "text/plain": [
       "<IPython.core.display.HTML object>"
      ]
     },
     "metadata": {},
     "output_type": "display_data"
    },
    {
     "name": "stdout",
     "output_type": "stream",
     "text": [
      "\n",
      "===================================BUG REPORT===================================\n",
      "Welcome to bitsandbytes. For bug reports, please run\n",
      "\n",
      "python -m bitsandbytes\n",
      "\n",
      " and submit this information together with your error trace to: https://github.com/TimDettmers/bitsandbytes/issues\n",
      "================================================================================\n",
      "bin /Users/liangyun2/miniforge3/envs/tf26/lib/python3.9/site-packages/bitsandbytes/libbitsandbytes_cpu.so\n",
      "'NoneType' object has no attribute 'cadam32bit_grad_fp32'\n",
      "CUDA SETUP: Loading binary /Users/liangyun2/miniforge3/envs/tf26/lib/python3.9/site-packages/bitsandbytes/libbitsandbytes_cpu.so...\n",
      "dlopen(/Users/liangyun2/miniforge3/envs/tf26/lib/python3.9/site-packages/bitsandbytes/libbitsandbytes_cpu.so, 0x0006): tried: '/Users/liangyun2/miniforge3/envs/tf26/lib/python3.9/site-packages/bitsandbytes/libbitsandbytes_cpu.so' (not a mach-o file)\n"
     ]
    },
    {
     "name": "stderr",
     "output_type": "stream",
     "text": [
      "/Users/liangyun2/miniforge3/envs/tf26/lib/python3.9/site-packages/bitsandbytes/cextension.py:34: UserWarning: The installed version of bitsandbytes was compiled without GPU support. 8-bit optimizers, 8-bit multiplication, and GPU quantization are unavailable.\n",
      "  warn(\"The installed version of bitsandbytes was compiled without GPU support. \"\n"
     ]
    }
   ],
   "source": [
    "%matplotlib inline \n",
    "model.fit(train_data=dl_train,\n",
    "          val_data=dl_val,\n",
    "          output_dir='output_dir',\n",
    "          epochs=100,\n",
    "          learning_rate=1e-3,\n",
    "          logging_steps=100,\n",
    "          monitor='val_loss',\n",
    "          patience=5,\n",
    "          mode='min',\n",
    "          plot=True,\n",
    "          wandb=False,\n",
    "          #no_cuda=True\n",
    "          #use_mps_device=True\n",
    "         )\n"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": null,
   "id": "43a2b26e-7283-4aa7-88c6-910698e5242a",
   "metadata": {},
   "outputs": [],
   "source": []
  },
  {
   "cell_type": "markdown",
   "id": "36bcdad3",
   "metadata": {},
   "source": [
    "### 4, evaluate the model"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 21,
   "id": "62f8cf7b",
   "metadata": {},
   "outputs": [
    {
     "data": {
      "text/html": [
       "\n",
       "    <div>\n",
       "      \n",
       "      <progress value='19' max='3' style='width:300px; height:20px; vertical-align: middle;'></progress>\n",
       "      [3/3 00:02]\n",
       "    </div>\n",
       "    "
      ],
      "text/plain": [
       "<IPython.core.display.HTML object>"
      ]
     },
     "metadata": {},
     "output_type": "display_data"
    },
    {
     "data": {
      "text/plain": [
       "{'eval_loss': 0.14472568035125732, 'eval_acc': 0.961077868938446}"
      ]
     },
     "execution_count": 21,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "model.evaluate(dl_val)\n"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 22,
   "id": "2e79d89b-30b4-453b-afbd-953c7a24ad93",
   "metadata": {},
   "outputs": [
    {
     "data": {
      "text/plain": [
       "{'eval_loss': 0.007294865325093269, 'eval_acc': 1.0}"
      ]
     },
     "execution_count": 22,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "model.evaluate(dl_train)"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": null,
   "id": "0405a48f-000b-40aa-8869-409d571f512e",
   "metadata": {},
   "outputs": [],
   "source": []
  },
  {
   "cell_type": "markdown",
   "id": "96911b58",
   "metadata": {},
   "source": [
    "### 5, use the model"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": null,
   "id": "c7b6d2c3-049f-45d8-a63f-86bcb535b9f5",
   "metadata": {},
   "outputs": [],
   "source": []
  },
  {
   "cell_type": "code",
   "execution_count": 23,
   "id": "91b21a4e-be1c-4fba-ae99-7fe4962c67b6",
   "metadata": {},
   "outputs": [
    {
     "name": "stdout",
     "output_type": "stream",
     "text": [
      "y_pred =  3\n",
      "y_prob =  0.9989043474197388\n"
     ]
    },
    {
     "data": {
      "image/svg+xml": [
       "<?xml version=\"1.0\" encoding=\"utf-8\" standalone=\"no\"?>\n",
       "<!DOCTYPE svg PUBLIC \"-//W3C//DTD SVG 1.1//EN\"\n",
       "  \"http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd\">\n",
       "<svg xmlns:xlink=\"http://www.w3.org/1999/xlink\" width=\"300.237pt\" height=\"297.190125pt\" viewBox=\"0 0 300.237 297.190125\" xmlns=\"http://www.w3.org/2000/svg\" version=\"1.1\">\n",
       " <metadata>\n",
       "  <rdf:RDF xmlns:dc=\"http://purl.org/dc/elements/1.1/\" xmlns:cc=\"http://creativecommons.org/ns#\" xmlns:rdf=\"http://www.w3.org/1999/02/22-rdf-syntax-ns#\">\n",
       "   <cc:Work>\n",
       "    <dc:type rdf:resource=\"http://purl.org/dc/dcmitype/StillImage\"/>\n",
       "    <dc:date>2023-05-29T11:38:46.861009</dc:date>\n",
       "    <dc:format>image/svg+xml</dc:format>\n",
       "    <dc:creator>\n",
       "     <cc:Agent>\n",
       "      <dc:title>Matplotlib v3.6.2, https://matplotlib.org/</dc:title>\n",
       "     </cc:Agent>\n",
       "    </dc:creator>\n",
       "   </cc:Work>\n",
       "  </rdf:RDF>\n",
       " </metadata>\n",
       " <defs>\n",
       "  <style type=\"text/css\">*{stroke-linejoin: round; stroke-linecap: butt}</style>\n",
       " </defs>\n",
       " <g id=\"figure_1\">\n",
       "  <g id=\"patch_1\">\n",
       "   <path d=\"M -0 297.190125 \n",
       "L 300.237 297.190125 \n",
       "L 300.237 0 \n",
       "L -0 0 \n",
       "z\n",
       "\" style=\"fill: #ffffff\"/>\n",
       "  </g>\n",
       "  <g id=\"axes_1\">\n",
       "   <g id=\"patch_2\">\n",
       "    <path d=\"M 26.925 273.312 \n",
       "L 293.037 273.312 \n",
       "L 293.037 7.2 \n",
       "L 26.925 7.2 \n",
       "z\n",
       "\" style=\"fill: #ffffff\"/>\n",
       "   </g>\n",
       "   <g clip-path=\"url(#pc7d1c8d160)\">\n",
       "    <image xlink:href=\"data:image/png;base64,\n",
       "iVBORw0KGgoAAAANSUhEUgAAAXIAAAFyCAYAAADoJFEJAAAIq0lEQVR4nO3cS6jmZQHH8fedGZ1xvDtOhaIlWBrZxXRMM7rQkGGCCMeMhBZJbjQIomWJboKKDKKFoi2soEUEQVAtgqhQycKMwbGZwEzLS6ZmM82o53RaRmTW83fO5Tt+Pvsf/wfely/P6pnvnC8szwDI2rDWBwDg5RFygDghB4gTcoA4IQeIE3KAOCEHiBNygDghB4gTcoA4IQeIE3KAOCEHiBNygDghB4gTcoA4IQeIE3KAOCEHiBNygDghB4gTcoA4IQeIE3KAOCEHiBNygDghB4gTcoA4IQeIE3KAOCEHiBNygDghB4gTcoA4IQeIE3KAOCEHiBNygDghB4gTcoA4IQeIE3KAOCEHiBNygDghB4gTcoA4IQeIE3KAOCEHiBNygDghB4gTcoA4IQeIE3KAOCEHiBNygDghB4gTcoA4IQeIE3KAOCEHiBNygDghB4gTcoA4IQeI27TWB4CVtmHLlvHNiScMb/Z86ozhzWw2my2etDhptxpO/NV4Irbfcve0jy0vT9vhRg5QJ+QAcUIOECfkAHFCDhAn5ABxQg4QJ+QAcUIOECfkAHFCDhAn5ABxHs0iZcPWrcObvbe9YXiz+z23D28OS5eOT9747msmferMj+0a3iwvrt8Hx1aTGzlAnJADxAk5QJyQA8QJOUCckAPECTlAnJADxAk5QJyQA8QJOUCckAPECTlA3HznfGF5rQ8B/689Xz9/fHPJLStwkv/06NKBSbt7Dp5yiE/y4i7Z+sTwZvP8iBU4yYs7/0ufHN685uY7V+AkPW7kAHFCDhAn5ABxQg4QJ+QAcUIOECfkAHFCDhAn5ABxQg4QJ+QAcUIOEOfRLFJOufvY4c2tp/1keHPl7y4d3jz15dcOb2az2eyo7/1i0m7Uk9deNLxZvPSZ4c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=\"266.4\"/>\n",
       "   </g>\n",
       "   <g id=\"matplotlib.axis_1\">\n",
       "    <g id=\"xtick_1\">\n",
       "     <g id=\"line2d_1\">\n",
       "      <defs>\n",
       "       <path id=\"m8408e5b7a0\" d=\"M 0 0 \n",
       "L 0 3.5 \n",
       "\" style=\"stroke: #000000; stroke-width: 0.8\"/>\n",
       "      </defs>\n",
       "      <g>\n",
       "       <use xlink:href=\"#m8408e5b7a0\" x=\"31.677\" y=\"273.312\" style=\"stroke: #000000; stroke-width: 0.8\"/>\n",
       "      </g>\n",
       "     </g>\n",
       "     <g id=\"text_1\">\n",
       "      <!-- 0 -->\n",
       "      <g transform=\"translate(28.49575 287.910437) scale(0.1 -0.1)\">\n",
       "       <defs>\n",
       "        <path id=\"DejaVuSans-30\" d=\"M 2034 4250 \n",
       "Q 1547 4250 1301 3770 \n",
       "Q 1056 3291 1056 2328 \n",
       "Q 1056 1369 1301 889 \n",
       "Q 1547 409 2034 409 \n",
       "Q 2525 409 2770 889 \n",
       "Q 3016 1369 3016 2328 \n",
       "Q 3016 3291 2770 3770 \n",
       "Q 2525 4250 2034 4250 \n",
       "z\n",
       "M 2034 4750 \n",
       "Q 2819 4750 3233 4129 \n",
       "Q 3647 3509 3647 2328 \n",
       "Q 3647 1150 3233 529 \n",
       "Q 2819 -91 2034 -91 \n",
       "Q 1250 -91 836 529 \n",
       "Q 422 1150 422 2328 \n",
       "Q 422 3509 836 4129 \n",
       "Q 1250 4750 2034 4750 \n",
       "z\n",
       "\" transform=\"scale(0.015625)\"/>\n",
       "       </defs>\n",
       "       <use xlink:href=\"#DejaVuSans-30\"/>\n",
       "      </g>\n",
       "     </g>\n",
       "    </g>\n",
       "    <g id=\"xtick_2\">\n",
       "     <g id=\"line2d_2\">\n",
       "      <g>\n",
       "       <use xlink:href=\"#m8408e5b7a0\" x=\"79.197\" y=\"273.312\" style=\"stroke: #000000; stroke-width: 0.8\"/>\n",
       "      </g>\n",
       "     </g>\n",
       "     <g id=\"text_2\">\n",
       "      <!-- 5 -->\n",
       "      <g transform=\"translate(76.01575 287.910437) scale(0.1 -0.1)\">\n",
       "       <defs>\n",
       "        <path id=\"DejaVuSans-35\" d=\"M 691 4666 \n",
       "L 3169 4666 \n",
       "L 3169 4134 \n",
       "L 1269 4134 \n",
       "L 1269 2991 \n",
       "Q 1406 3038 1543 3061 \n",
       "Q 1681 3084 1819 3084 \n",
       "Q 2600 3084 3056 2656 \n",
       "Q 3513 2228 3513 1497 \n",
       "Q 3513 744 3044 326 \n",
       "Q 2575 -91 1722 -91 \n",
       "Q 1428 -91 1123 -41 \n",
       "Q 819 9 494 109 \n",
       "L 494 744 \n",
       "Q 775 591 1075 516 \n",
       "Q 1375 441 1709 441 \n",
       "Q 2250 441 2565 725 \n",
       "Q 2881 1009 2881 1497 \n",
       "Q 2881 1984 2565 2268 \n",
       "Q 2250 2553 1709 2553 \n",
       "Q 1456 2553 1204 2497 \n",
       "Q 953 2441 691 2322 \n",
       "L 691 4666 \n",
       "z\n",
       "\" transform=\"scale(0.015625)\"/>\n",
       "       </defs>\n",
       "       <use xlink:href=\"#DejaVuSans-35\"/>\n",
       "      </g>\n",
       "     </g>\n",
       "    </g>\n",
       "    <g id=\"xtick_3\">\n",
       "     <g id=\"line2d_3\">\n",
       "      <g>\n",
       "       <use xlink:href=\"#m8408e5b7a0\" x=\"126.717\" y=\"273.312\" style=\"stroke: #000000; stroke-width: 0.8\"/>\n",
       "      </g>\n",
       "     </g>\n",
       "     <g id=\"text_3\">\n",
       "      <!-- 10 -->\n",
       "      <g transform=\"translate(120.3545 287.910437) scale(0.1 -0.1)\">\n",
       "       <defs>\n",
       "        <path id=\"DejaVuSans-31\" d=\"M 794 531 \n",
       "L 1825 531 \n",
       "L 1825 4091 \n",
       "L 703 3866 \n",
       "L 703 4441 \n",
       "L 1819 4666 \n",
       "L 2450 4666 \n",
       "L 2450 531 \n",
       "L 3481 531 \n",
       "L 3481 0 \n",
       "L 794 0 \n",
       "L 794 531 \n",
       "z\n",
       "\" transform=\"scale(0.015625)\"/>\n",
       "       </defs>\n",
       "       <use xlink:href=\"#DejaVuSans-31\"/>\n",
       "       <use xlink:href=\"#DejaVuSans-30\" x=\"63.623047\"/>\n",
       "      </g>\n",
       "     </g>\n",
       "    </g>\n",
       "    <g id=\"xtick_4\">\n",
       "     <g id=\"line2d_4\">\n",
       "      <g>\n",
       "       <use xlink:href=\"#m8408e5b7a0\" x=\"174.237\" y=\"273.312\" style=\"stroke: #000000; stroke-width: 0.8\"/>\n",
       "      </g>\n",
       "     </g>\n",
       "     <g id=\"text_4\">\n",
       "      <!-- 15 -->\n",
       "      <g transform=\"translate(167.8745 287.910437) scale(0.1 -0.1)\">\n",
       "       <use xlink:href=\"#DejaVuSans-31\"/>\n",
       "       <use xlink:href=\"#DejaVuSans-35\" x=\"63.623047\"/>\n",
       "      </g>\n",
       "     </g>\n",
       "    </g>\n",
       "    <g id=\"xtick_5\">\n",
       "     <g id=\"line2d_5\">\n",
       "      <g>\n",
       "       <use xlink:href=\"#m8408e5b7a0\" x=\"221.757\" y=\"273.312\" style=\"stroke: #000000; stroke-width: 0.8\"/>\n",
       "      </g>\n",
       "     </g>\n",
       "     <g id=\"text_5\">\n",
       "      <!-- 20 -->\n",
       "      <g transform=\"translate(215.3945 287.910437) scale(0.1 -0.1)\">\n",
       "       <defs>\n",
       "        <path id=\"DejaVuSans-32\" d=\"M 1228 531 \n",
       "L 3431 531 \n",
       "L 3431 0 \n",
       "L 469 0 \n",
       "L 469 531 \n",
       "Q 828 903 1448 1529 \n",
       "Q 2069 2156 2228 2338 \n",
       "Q 2531 2678 2651 2914 \n",
       "Q 2772 3150 2772 3378 \n",
       "Q 2772 3750 2511 3984 \n",
       "Q 2250 4219 1831 4219 \n",
       "Q 1534 4219 1204 4116 \n",
       "Q 875 4013 500 3803 \n",
       "L 500 4441 \n",
       "Q 881 4594 1212 4672 \n",
       "Q 1544 4750 1819 4750 \n",
       "Q 2544 4750 2975 4387 \n",
       "Q 3406 4025 3406 3419 \n",
       "Q 3406 3131 3298 2873 \n",
       "Q 3191 2616 2906 2266 \n",
       "Q 2828 2175 2409 1742 \n",
       "Q 1991 1309 1228 531 \n",
       "z\n",
       "\" transform=\"scale(0.015625)\"/>\n",
       "       </defs>\n",
       "       <use xlink:href=\"#DejaVuSans-32\"/>\n",
       "       <use xlink:href=\"#DejaVuSans-30\" x=\"63.623047\"/>\n",
       "      </g>\n",
       "     </g>\n",
       "    </g>\n",
       "    <g id=\"xtick_6\">\n",
       "     <g id=\"line2d_6\">\n",
       "      <g>\n",
       "       <use xlink:href=\"#m8408e5b7a0\" x=\"269.277\" y=\"273.312\" style=\"stroke: #000000; stroke-width: 0.8\"/>\n",
       "      </g>\n",
       "     </g>\n",
       "     <g id=\"text_6\">\n",
       "      <!-- 25 -->\n",
       "      <g transform=\"translate(262.9145 287.910437) scale(0.1 -0.1)\">\n",
       "       <use xlink:href=\"#DejaVuSans-32\"/>\n",
       "       <use xlink:href=\"#DejaVuSans-35\" x=\"63.623047\"/>\n",
       "      </g>\n",
       "     </g>\n",
       "    </g>\n",
       "   </g>\n",
       "   <g id=\"matplotlib.axis_2\">\n",
       "    <g id=\"ytick_1\">\n",
       "     <g id=\"line2d_7\">\n",
       "      <defs>\n",
       "       <path id=\"m99ac7f8a86\" d=\"M 0 0 \n",
       "L -3.5 0 \n",
       "\" style=\"stroke: #000000; stroke-width: 0.8\"/>\n",
       "      </defs>\n",
       "      <g>\n",
       "       <use xlink:href=\"#m99ac7f8a86\" x=\"26.925\" y=\"11.952\" style=\"stroke: #000000; stroke-width: 0.8\"/>\n",
       "      </g>\n",
       "     </g>\n",
       "     <g id=\"text_7\">\n",
       "      <!-- 0 -->\n",
       "      <g transform=\"translate(13.5625 15.751219) scale(0.1 -0.1)\">\n",
       "       <use xlink:href=\"#DejaVuSans-30\"/>\n",
       "      </g>\n",
       "     </g>\n",
       "    </g>\n",
       "    <g id=\"ytick_2\">\n",
       "     <g id=\"line2d_8\">\n",
       "      <g>\n",
       "       <use xlink:href=\"#m99ac7f8a86\" x=\"26.925\" y=\"59.472\" style=\"stroke: #000000; stroke-width: 0.8\"/>\n",
       "      </g>\n",
       "     </g>\n",
       "     <g id=\"text_8\">\n",
       "      <!-- 5 -->\n",
       "      <g transform=\"translate(13.5625 63.271219) scale(0.1 -0.1)\">\n",
       "       <use xlink:href=\"#DejaVuSans-35\"/>\n",
       "      </g>\n",
       "     </g>\n",
       "    </g>\n",
       "    <g id=\"ytick_3\">\n",
       "     <g id=\"line2d_9\">\n",
       "      <g>\n",
       "       <use xlink:href=\"#m99ac7f8a86\" x=\"26.925\" y=\"106.992\" style=\"stroke: #000000; stroke-width: 0.8\"/>\n",
       "      </g>\n",
       "     </g>\n",
       "     <g id=\"text_9\">\n",
       "      <!-- 10 -->\n",
       "      <g transform=\"translate(7.2 110.791219) scale(0.1 -0.1)\">\n",
       "       <use xlink:href=\"#DejaVuSans-31\"/>\n",
       "       <use xlink:href=\"#DejaVuSans-30\" x=\"63.623047\"/>\n",
       "      </g>\n",
       "     </g>\n",
       "    </g>\n",
       "    <g id=\"ytick_4\">\n",
       "     <g id=\"line2d_10\">\n",
       "      <g>\n",
       "       <use xlink:href=\"#m99ac7f8a86\" x=\"26.925\" y=\"154.512\" style=\"stroke: #000000; stroke-width: 0.8\"/>\n",
       "      </g>\n",
       "     </g>\n",
       "     <g id=\"text_10\">\n",
       "      <!-- 15 -->\n",
       "      <g transform=\"translate(7.2 158.311219) scale(0.1 -0.1)\">\n",
       "       <use xlink:href=\"#DejaVuSans-31\"/>\n",
       "       <use xlink:href=\"#DejaVuSans-35\" x=\"63.623047\"/>\n",
       "      </g>\n",
       "     </g>\n",
       "    </g>\n",
       "    <g id=\"ytick_5\">\n",
       "     <g id=\"line2d_11\">\n",
       "      <g>\n",
       "       <use xlink:href=\"#m99ac7f8a86\" x=\"26.925\" y=\"202.032\" style=\"stroke: #000000; stroke-width: 0.8\"/>\n",
       "      </g>\n",
       "     </g>\n",
       "     <g id=\"text_11\">\n",
       "      <!-- 20 -->\n",
       "      <g transform=\"translate(7.2 205.831219) scale(0.1 -0.1)\">\n",
       "       <use xlink:href=\"#DejaVuSans-32\"/>\n",
       "       <use xlink:href=\"#DejaVuSans-30\" x=\"63.623047\"/>\n",
       "      </g>\n",
       "     </g>\n",
       "    </g>\n",
       "    <g id=\"ytick_6\">\n",
       "     <g id=\"line2d_12\">\n",
       "      <g>\n",
       "       <use xlink:href=\"#m99ac7f8a86\" x=\"26.925\" y=\"249.552\" style=\"stroke: #000000; stroke-width: 0.8\"/>\n",
       "      </g>\n",
       "     </g>\n",
       "     <g id=\"text_12\">\n",
       "      <!-- 25 -->\n",
       "      <g transform=\"translate(7.2 253.351219) scale(0.1 -0.1)\">\n",
       "       <use xlink:href=\"#DejaVuSans-32\"/>\n",
       "       <use xlink:href=\"#DejaVuSans-35\" x=\"63.623047\"/>\n",
       "      </g>\n",
       "     </g>\n",
       "    </g>\n",
       "   </g>\n",
       "   <g id=\"patch_3\">\n",
       "    <path d=\"M 26.925 273.312 \n",
       "L 26.925 7.2 \n",
       "\" style=\"fill: none; stroke: #000000; stroke-width: 0.8; stroke-linejoin: miter; stroke-linecap: square\"/>\n",
       "   </g>\n",
       "   <g id=\"patch_4\">\n",
       "    <path d=\"M 293.037 273.312 \n",
       "L 293.037 7.2 \n",
       "\" style=\"fill: none; stroke: #000000; stroke-width: 0.8; stroke-linejoin: miter; stroke-linecap: square\"/>\n",
       "   </g>\n",
       "   <g id=\"patch_5\">\n",
       "    <path d=\"M 26.925 273.312 \n",
       "L 293.037 273.312 \n",
       "\" style=\"fill: none; stroke: #000000; stroke-width: 0.8; stroke-linejoin: miter; stroke-linecap: square\"/>\n",
       "   </g>\n",
       "   <g id=\"patch_6\">\n",
       "    <path d=\"M 26.925 7.2 \n",
       "L 293.037 7.2 \n",
       "\" style=\"fill: none; stroke: #000000; stroke-width: 0.8; stroke-linejoin: miter; stroke-linecap: square\"/>\n",
       "   </g>\n",
       "  </g>\n",
       " </g>\n",
       " <defs>\n",
       "  <clipPath id=\"pc7d1c8d160\">\n",
       "   <rect x=\"26.925\" y=\"7.2\" width=\"266.112\" height=\"266.112\"/>\n",
       "  </clipPath>\n",
       " </defs>\n",
       "</svg>\n"
      ],
      "text/plain": [
       "<Figure size 640x480 with 1 Axes>"
      ]
     },
     "metadata": {},
     "output_type": "display_data"
    }
   ],
   "source": [
    "net = model.net\n",
    "net.eval();\n",
    "\n",
    "device = torch.device('cpu')\n",
    "img,label = ds_train[1]\n",
    "tensor = img.to(device)\n",
    "\n",
    "y_pred = torch.argmax(net(tensor[None,...])) \n",
    "y_prob = torch.softmax(net(tensor[None,...]),dim=-1).max() \n",
    "\n",
    "img = img.permute(1,2,0)\n",
    "plt.imshow(img)\n",
    "print('y_pred = ', y_pred.item())\n",
    "print('y_prob = ', y_prob.item())\n",
    "\n"
   ]
  },
  {
   "cell_type": "markdown",
   "id": "81da8622",
   "metadata": {},
   "source": [
    "### 6, save the model"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 24,
   "id": "45089d19",
   "metadata": {},
   "outputs": [],
   "source": [
    "#torch.save(model.net.state_dict(),'checkpoint.pt')\n",
    "model.save_ckpt('checkpoint.pt')\n"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": null,
   "id": "3655c76e-792b-48cc-a02a-cfe0e95ec6d9",
   "metadata": {},
   "outputs": [],
   "source": []
  }
 ],
 "metadata": {
  "jupytext": {
   "cell_metadata_filter": "-all",
   "main_language": "python",
   "notebook_metadata_filter": "-all"
  },
  "kernelspec": {
   "display_name": "Python 3 (ipykernel)",
   "language": "python",
   "name": "python3"
  },
  "language_info": {
   "codemirror_mode": {
    "name": "ipython",
    "version": 3
   },
   "file_extension": ".py",
   "mimetype": "text/x-python",
   "name": "python",
   "nbconvert_exporter": "python",
   "pygments_lexer": "ipython3",
   "version": "3.9.0"
  }
 },
 "nbformat": 4,
 "nbformat_minor": 5
}
